Skip to content
Snippets Groups Projects
Commit 1ecd06c9 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Fix incorrect installation of CWL files

Many CWL files were being installed in the wrong directory. This
has been fixed. This commit fixes RAP-249.


Former-commit-id: 1c86f81c
Former-commit-id: 529e3eee
parent e6c12344
No related branches found
No related tags found
No related merge requests found
from setuptools import setup from setuptools import setup
import os import os
import pathlib
def read(rel_path): def read(rel_path):
...@@ -12,6 +11,13 @@ def read(rel_path): ...@@ -12,6 +11,13 @@ def read(rel_path):
return fp.read() return fp.read()
data_files = []
for top in ('lofar-cwl/steps', 'steps', 'subworkflow', 'workflows'):
for root, _, files in os.walk(top):
cwl_files = [os.path.join(root, f) for f in files if f.endswith('.cwl')]
if cwl_files:
data_files.append((os.path.join('share/prefactor', root), cwl_files))
setup( setup(
name='prefactor3-cwl', name='prefactor3-cwl',
version='0.3.0', version='0.3.0',
...@@ -28,7 +34,5 @@ setup( ...@@ -28,7 +34,5 @@ setup(
install_requires=[ install_requires=[
'prefactor@git+https://github.com/lofar-astron/prefactor.git' 'prefactor@git+https://github.com/lofar-astron/prefactor.git'
], ],
data_files=[(os.path.join('share', 'prefactor', dir), data_files=data_files
[str(p) for p in pathlib.Path(dir).glob('**/*.cwl')]) for dir in
('lofar-cwl', 'steps', 'subworkflow', 'workflows')]
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment