Skip to content

Commit 5958e1c

Browse files
committed
Make download work using url filename
Add user agent string
1 parent cbc5c13 commit 5958e1c

4 files changed

Lines changed: 59 additions & 59 deletions

File tree

.idea/workspace.xml

Lines changed: 54 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hdx/data/hdxobject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, configuration: Configuration, initial_data: dict):
5151
super(HDXObject, self).__init__(initial_data)
5252
self.configuration = configuration
5353
self.old_data = None
54-
version_file = open(script_dir_plus_file(join('..', '..', 'version.txt'), HDXObject))
54+
version_file = open(script_dir_plus_file(join('..', 'version.txt'), HDXObject))
5555
version = version_file.read().strip()
5656
self.hdxpostsite = ckanapi.RemoteCKAN(configuration.get_hdx_site_url(),
5757
apikey=configuration.get_api_key(),
File renamed without changes.

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
from os.path import join
2+
13
from setuptools import setup, find_packages
24

35
from hdx.utilities.path import script_dir_plus_file
46

57

68
def get_version():
7-
version_file = open(script_dir_plus_file('version.txt', get_version))
9+
version_file = open(script_dir_plus_file(join('hdx', 'version.txt'), get_version))
810
return version_file.read().strip()
911

1012
requirements = ['ckanapi',
@@ -33,4 +35,5 @@ def get_version():
3335
# Include version.txt and if any package contains *.yml files, include them:
3436
'': ['version.txt', '*.yml'],
3537
},
38+
include_package_data=True,
3639
)

0 commit comments

Comments
 (0)