Skip to content

Commit

Permalink
hard coding packages to include in order to avoid import pathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
squoilin committed Dec 18, 2017
1 parent e07298c commit 9c6cf1d
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
#!/usr/bin/env python

from pathlib import Path
from setuptools import setup, find_packages


# Sets the __version__ variable
__version__ = None
exec(open('DispaSET/_version.py').read())


def get_subdirs(path, glob_string):
return [
i.relative_to(str(path) + '/')
for i in path.glob(glob_string) if i.is_dir()
]


def find_package_data():
"""Returns a list of found directories with package data files"""
path = Path('./DispaSET')
package_data = ['config/*.yaml','GAMS/*']
for test_case_dir in get_subdirs(path, 'test/*'):
package_data.append(str(test_case_dir) + '/*.csv')
print(package_data)
return package_data


setup(
name='Dispa-SET',
version=__version__,
Expand All @@ -36,7 +17,7 @@ def find_package_data():
url='http://www.dispaset.eu',
download_url='http://www.dispaset.eu/en/latest/releases.html',
packages=find_packages(),
package_data={'DispaSET': find_package_data()},
package_data={'DispaSET': ['config/*.yaml','GAMS/*']},
install_requires=[
"click >= 3.3",
"numpy >= 1.12",
Expand Down

0 comments on commit 9c6cf1d

Please sign in to comment.