-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from uparma/feature/setup_cfg
Feature/setup cfg
- Loading branch information
Showing
10 changed files
with
139 additions
and
79 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
__pycache__ | ||
*.pyc | ||
docs/build | ||
*.json | ||
build | ||
pyenv | ||
.idea | ||
.DS_Store | ||
.tox | ||
uparma/version.txt |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[dev-dependencies] | ||
black = { version = "^18.3-alpha.0", python = "^3.8" } | ||
|
||
[build-system] | ||
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "uparma/version.txt" | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ["py38"] | ||
include = '\.pyi?$' | ||
extend-exclude = ''' | ||
/( | ||
# The following are specific to Black, you probably don't want those. | ||
| blib2to3 | ||
| profiling | ||
)/ | ||
''' | ||
|
||
[tool.tox] | ||
legacy_tox_ini = """ | ||
[tox] | ||
envlist = py38,py39 | ||
isolated_build = True | ||
[testenv] | ||
passenv = | ||
* | ||
commands = | ||
pytest {posargs} | ||
[testenv:coverage] | ||
commands = | ||
coverage erase | ||
coverage run --source=ursgal {envbindir}/pytest {posargs} | ||
coverage report -m | ||
""" | ||
|
||
[tool.pytest.ini_options] | ||
markers = [ | ||
"slow: marks tests as slow (deselect with '-m \"not slow\"')", | ||
] |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[metadata] | ||
name = uparma | ||
description = tba | ||
long_description = tba | ||
author = tba | ||
author_email = [email protected] | ||
url = https://github.com/uparma | ||
license = tba | ||
classifier = | ||
Development Status :: 4 - Beta | ||
Environment :: Console | ||
Intended Audience :: Education | ||
Intended Audience :: Science/Research | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Operating System :: MacOS :: MacOS X | ||
Operating System :: Microsoft :: Windows | ||
Operating System :: POSIX | ||
Operating System :: POSIX :: SunOS/Solaris | ||
Operating System :: Unix | ||
Programming Language :: Python :: 3.5 | ||
Topic :: Scientific/Engineering :: Bio-Informatics | ||
Topic :: Scientific/Engineering :: Chemistry | ||
Topic :: Scientific/Engineering :: Medical Science Apps | ||
|
||
[options] | ||
packages = find_namespace: | ||
install_requires = | ||
pytest==6.2.2 | ||
requests==2.25.1 | ||
|
||
[options.package_data] | ||
uparma = *.txt, *.json | ||
|
||
[egg_info] | ||
egg_base = . |
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,52 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
from setuptools import setup | ||
import os | ||
|
||
|
||
# We store our version number in a simple text file: | ||
version_path = os.path.join(os.path.dirname(__file__), "uparma", "version.txt") | ||
|
||
with open(version_path, "r") as version_file: | ||
uparma_py_version = version_file.read().strip() | ||
|
||
with open("requirements.txt") as req_file: | ||
reqs = req_file.readlines() | ||
|
||
|
||
setup( | ||
name="uparma", | ||
version=uparma_py_version, | ||
packages=["uparma"], | ||
package_dir={"uparma": "uparma"}, | ||
description="uparma", | ||
package_data={ | ||
"uparma": [ | ||
"version.txt", | ||
"lib_version.txt", | ||
] | ||
}, | ||
install_requires=reqs, | ||
long_description="Universal Parameter Mapper for Proteomics tools", | ||
author="... and Christian Fufezan", | ||
author_email="[email protected]", | ||
url="http://github.com/uparma/uparma-py", | ||
license="Lesser GNU General Public License (LGPL)", | ||
platforms="any that supports python 3.4", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"Intended Audience :: Developers", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX", | ||
"Operating System :: POSIX :: SunOS/Solaris", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"Topic :: Scientific/Engineering :: Chemistry", | ||
"Topic :: Scientific/Engineering :: Medical Science Apps.", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
import setuptools | ||
|
||
|
||
def branch_dependent_version(): | ||
import setuptools_scm | ||
|
||
def void(version): | ||
return "" | ||
|
||
def version_scheme(version): | ||
if version.branch not in ["main", "master"]: | ||
_v = setuptools_scm.get_version(local_scheme=void) | ||
else: | ||
_v = str(version.tag) | ||
return _v | ||
|
||
def local_scheme(version): | ||
if version.branch not in ["main", "master"]: | ||
_v = setuptools_scm.get_version(version_scheme=void) | ||
else: | ||
_v = "" | ||
return _v | ||
|
||
scm_version = { | ||
"root": ".", | ||
"relative_to": __file__, | ||
"version_scheme": version_scheme, | ||
"local_scheme": local_scheme | ||
# >> "no-local-version" not quit good enough | ||
# >> on dev "node-and-timestamp", # version_scheme, | ||
} | ||
return scm_version | ||
|
||
|
||
setuptools.setup( | ||
use_scm_version=branch_dependent_version, | ||
setup_requires=["setuptools_scm"], | ||
) |
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
Empty file.
Empty file.
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 was deleted.
Oops, something went wrong.