Browse Source

fix: deployment flow (#279)

pull/281/head
sgelis 2 years ago
committed by GitHub
parent
commit
6a6ed7cf11
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      setup.py

23
setup.py

@ -4,20 +4,18 @@
$ python setup.py install $ python setup.py install
""" """
from patacrep import __version__ from patacrep import __version__, __DATADIR__
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
import sys
setup_kwargs = { setup_kwargs = {
'setup_requires': [], 'setup_requires': [],
} }
if sys.platform[0:3] == 'win':
from patacrep import __DATADIR__
def recursive_find(root_directory): def recursive_find(root_directory):
"""Recursively find files from a root_directory. """Recursively find files from a root_directory.
Return a list of files matching those conditions. Return a list of files matching those conditions.
@ -35,13 +33,12 @@ if sys.platform[0:3] == 'win':
yield os.path.join(root, filename) yield os.path.join(root, filename)
os.chdir(olddir) os.chdir(olddir)
# List the data files
data_files = recursive_find(__DATADIR__) # List the data files
data_files = ["data/" + d for d in data_files] data_files = recursive_find(__DATADIR__)
setup_kwargs['package_data'] = {'patacrep': data_files} data_files = ["data/" + d for d in data_files]
else: setup_kwargs['package_data'] = {'patacrep': data_files}
setup_kwargs['setup_requires'].append('hgtools')
setup_kwargs['include_package_data'] = True
setup( setup(
name='patacrep', name='patacrep',
@ -74,6 +71,6 @@ setup(
], ],
platforms=["GNU/Linux", "Windows", "MacOsX"], platforms=["GNU/Linux", "Windows", "MacOsX"],
test_suite="test.suite", test_suite="test.suite",
long_description = open("README.rst", "r").read(), long_description=open("README.rst", "r").read(),
**setup_kwargs **setup_kwargs
) )

Loading…
Cancel
Save