generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,46 +3,38 @@ | |
|
||
_version_re = re.compile(r"(?<=^__version__ = (\"|'))(.+)(?=\"|')") | ||
|
||
|
||
def get_version(rel_path: str) -> str: | ||
""" | ||
Searches for the ``__version__ = `` line in a source code file. | ||
https://packaging.python.org/en/latest/guides/single-sourcing-package-version/ | ||
""" | ||
with open(rel_path, 'r') as f: | ||
with open(rel_path, "r") as f: | ||
matches = map(_version_re.search, f) | ||
filtered = filter(lambda m: m is not None, matches) | ||
version = next(filtered, None) | ||
if version is None: | ||
raise RuntimeError(f'Could not find __version__ in {rel_path}') | ||
raise RuntimeError(f"Could not find __version__ in {rel_path}") | ||
return version.group(0) | ||
|
||
|
||
setup( | ||
name='coneme', | ||
version=get_version('coneme.py'), | ||
description='A ChRIS plugin to compute network measures', | ||
author='FNNDSC', | ||
author_email='[email protected]', | ||
url='https://github.com/FNNDSC/pl-coneme', | ||
py_modules=['coneme'], | ||
install_requires=['chris_plugin'], | ||
license='MIT', | ||
entry_points={ | ||
'console_scripts': [ | ||
'coneme = coneme:main' | ||
] | ||
}, | ||
name="coneme", | ||
version=get_version("coneme.py"), | ||
description="A ChRIS plugin to compute network measures", | ||
author="FNNDSC", | ||
author_email="[email protected]", | ||
url="https://github.com/FNNDSC/pl-coneme", | ||
py_modules=["coneme"], | ||
install_requires=["chris_plugin"], | ||
license="MIT", | ||
entry_points={"console_scripts": ["coneme = coneme:main"]}, | ||
classifiers=[ | ||
'License :: OSI Approved :: MIT License', | ||
'Topic :: Scientific/Engineering', | ||
'Topic :: Scientific/Engineering :: Bio-Informatics', | ||
'Topic :: Scientific/Engineering :: Medical Science Apps.' | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"Topic :: Scientific/Engineering :: Medical Science Apps.", | ||
], | ||
extras_require={ | ||
'none': [], | ||
'dev': [ | ||
'pytest~=7.1' | ||
] | ||
} | ||
extras_require={"none": [], "dev": ["pytest~=7.1"]}, | ||
) |