Skip to content

Commit 24e9fc5

Browse files
committed
Rename for packaging.
1 parent 29ab237 commit 24e9fc5

File tree

10 files changed

+10
-5
lines changed

10 files changed

+10
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,6 @@ venv.bak/
102102

103103
# mypy
104104
.mypy_cache/
105+
106+
# local test file
107+
test.py

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ipinfo_wrapper/countries.json
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Handler():
1313
API_URL = 'https://ipinfo.io'
1414
CACHE_MAXSIZE = 4096
1515
CACHE_TTL = 60 * 60 * 24
16-
COUNTRY_FILE_DEFAULT = '/ipinfo/countries.json'
16+
COUNTRY_FILE_DEFAULT = 'countries.json'
1717

1818
def __init__(self, access_token=None, **kwargs):
1919
self.access_token = access_token
@@ -67,7 +67,7 @@ def _get_headers(self):
6767

6868
def _read_country_names(self, countries_file = None):
6969
if not countries_file:
70-
countries_file = os.getcwd() + self.COUNTRY_FILE_DEFAULT
70+
countries_file = os.path.join(os.path.dirname(__file__), self.COUNTRY_FILE_DEFAULT)
7171
with open(countries_file) as f:
7272
countries_json = f.read()
7373

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from setuptools import setup
22

3-
setup(name='ipinfo',
4-
version='0.1',
3+
setup(name='ipinfo_wrapper',
4+
version='0.1.3',
55
description='Official Python library for IPInfo',
66
url='https://github.com/ipinfo/python',
77
author='James Timmins',
88
author_email='[email protected]',
99
license='Apache License 2.0',
10-
packages=['ipinfo'],
10+
packages=['ipinfo_wrapper', 'ipinfo_wrapper.cache'],
11+
include_package_data=True,
1112
zip_safe=False)

0 commit comments

Comments
 (0)