Skip to content

Commit

Permalink
attempt to dix data_files
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Stubbs committed Apr 16, 2019
1 parent 90638e5 commit 0db4cb5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import sys

HERE = os.path.dirname(__file__)

class PyTest(TestCommand):

Expand All @@ -33,9 +34,19 @@ def run_tests(self):
if sys.version_info[0] == 2:
requires.extend([pkg for pkg in open('requirements-py2.txt').readlines()])

# append resources files into the data_files object:
data_files = [('', ['requirements.txt', 'requirements-py2.txt'])]
resources = os.listdir(os.path.join(HERE, 'agavepy', 'resources'))
resource_list = []
for r in resources:
resource_list.append(os.path.join('agavepy', 'resources', r))

data_files.append(('agavepy/resources', resource_list))
print(data_files)

setup(
name='agavepy',
version='0.9.0',
version='0.9.1',
description='SDK for Agave',
long_description=readme,
author='Texas Advanced Computing Center',
Expand All @@ -48,11 +59,11 @@ def run_tests(self):
"agavepy.clients",
"agavepy.tokens",
"agavepy.files",
"agavepy.utils"
"agavepy.utils",
],
package_dir={'agavepy': 'agavepy'},
package_data={'agavepy': ['resources.json', 'resources.json.j2']},
data_files=[('', ['requirements.txt', 'requirements-py2.txt'])],
package_data={'agavepy': ['resources.json', 'resources.json.j2', 'resource_exceptions.json']},
data_files=data_files,
install_requires=requires,
license="BSD",
zip_safe=False,
Expand Down

0 comments on commit 0db4cb5

Please sign in to comment.