-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protcur setup.py first pass at unit data files
- Loading branch information
Showing
4 changed files
with
67 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
from pathlib import Path | ||
__script_folder__ = Path(__file__).resolve().parent | ||
__units_folder__ = Path(__script_folder__, '../../protc-lib/protc/units') | ||
__units_test_folder__ = Path(__script_folder__, '../../protc-lib/protc/units/test') | ||
__units_test_params__ = Path(__script_folder__, '../../protc-lib/protc/units/test/params.rkt') | ||
|
||
if not __units_folder__.exists(): | ||
__units_folder__ = Path('/usr/share') | ||
|
||
__units_test_folder__ = __units_folder__ / 'test' | ||
__units_test_params__ = __units_test_folder__ / 'params.rkt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import re | ||
import sys | ||
import shutil | ||
from pathlib import Path | ||
from setuptools import setup | ||
|
||
|
||
|
@@ -16,36 +19,58 @@ def find_version(filename): | |
# TODO pandoc conversion | ||
long_description = f.read() | ||
|
||
|
||
RELEASE = '--release' in sys.argv | ||
if RELEASE: | ||
sys.argv.remove('--release') | ||
from protcur.config import __units_folder__, __units_test_folder__ | ||
units = [p.name for p in __units_folder__.iterdir() | ||
if p.is_file() and p.name != 'parsing.rkt' and p.suffix == '.rkt'] | ||
units_test = [p.parent.name + '/' + p.name | ||
for p in __units_test_folder__.iterdir() | ||
if p.is_file() and p.suffix == '.rkt'] | ||
shutil.copytree(__units_folder__, 'units') | ||
data_files=[('protcur/units', units), | ||
('protcur/units/test', units_test)] | ||
else: | ||
data_files = [] | ||
|
||
tests_require = ['pytest', 'pytest-runner'] | ||
setup(name='protcur', | ||
version=__version__, | ||
description='A dashboard for web annotation workflows for protocol curation.', | ||
long_description=long_description, | ||
long_description_content_type='text/plain', | ||
url='https://github.com/tgbugs/protc/tree/master/protcur', | ||
author='Tom Gillespie', | ||
author_email='[email protected]', | ||
license='MIT', | ||
classifiers=[], | ||
keywords=('protc protocols dashboard curation ' | ||
'hypothesis hypothes.is web annotation'), | ||
packages=['protcur'], | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
'flask', | ||
'htmlfn', | ||
'hyputils>=0.0.4', | ||
'Markdown', | ||
'pyontutils>=0.1.3', | ||
'pysercomb', | ||
], | ||
extras_require={'dev':[], | ||
'test': tests_require, | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'protcur-server=protcur.server:main', | ||
'protcur-analysis=protcur.analysis:main', | ||
|
||
try: | ||
setup(name='protcur', | ||
version=__version__, | ||
description='A dashboard for web annotation workflows for protocol curation.', | ||
long_description=long_description, | ||
long_description_content_type='text/plain', | ||
url='https://github.com/tgbugs/protc/tree/master/protcur', | ||
author='Tom Gillespie', | ||
author_email='[email protected]', | ||
license='MIT', | ||
classifiers=[], | ||
keywords=('protc protocols dashboard curation ' | ||
'hypothesis hypothes.is web annotation'), | ||
packages=['protcur'], | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
'flask', | ||
'htmlfn', | ||
'hyputils>=0.0.4', | ||
'Markdown', | ||
'pyontutils>=0.1.3', | ||
'pysercomb', | ||
], | ||
}, | ||
) | ||
extras_require={'dev':[], | ||
'test': tests_require, | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'protcur-server=protcur.server:main', | ||
'protcur-analysis=protcur.analysis:main', | ||
], | ||
}, | ||
data_files=data_files, | ||
) | ||
finally: | ||
if RELEASE: | ||
shutil.rmtree('units') |