From 320bf259a07bc4c2de7294866b18e55e7e8dbb19 Mon Sep 17 00:00:00 2001 From: Marcel Loose <loose@astron.nl> Date: Wed, 6 Oct 2021 18:23:04 +0200 Subject: [PATCH] Make package pip-installable Added a setup.py file, which makes the package installable through pip. Former-commit-id: 696f56d600f98f8d88b250d957242932d5286681 --- setup.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..9aec5839 --- /dev/null +++ b/setup.py @@ -0,0 +1,34 @@ +from setuptools import setup +import os +import pathlib + + +def read(rel_path): + """Function read() was copied from setup.py in Pip package.""" + here = os.path.abspath(os.path.dirname(__file__)) + # intentionally *not* adding an encoding option to open, See: + # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 + with open(os.path.join(here, rel_path), "r") as fp: + return fp.read() + + +setup( + name='prefactor3-cwl', + version='0.3.0', + url='https://git.astron.nl/eosc/prefactor3-cwl/', + description="Prefactor 3 pipeline (CWL version)", + long_description=read('README.md'), + platforms='any', + classifiers=['Programming Language :: Python :: 3', + 'Development Status :: 3 - Alpha', + 'Natural Language :: English', + 'Intended Audience :: Science/Research', + 'Operating System :: POSIX :: Linux', + 'Topic :: Scientific/Engineering :: Astronomy'], + install_requires=[ + 'prefactor@git+https://github.com/lofar-astron/prefactor.git' + ], + data_files=[(os.path.join('share', 'prefactor', dir), + [str(p) for p in pathlib.Path(dir).glob('**/*.cwl')]) for dir in + ('lofar-cwl', 'steps', 'subworkflow', 'workflows')] +) -- GitLab