-
Notifications
You must be signed in to change notification settings - Fork 2
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
2 changed files
with
107 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | ||
|
||
# --- Setuptools metadata ---------------------------------------------------- | ||
|
||
[metadata] | ||
name = mini3di | ||
version = attr: mini3di.__version__ | ||
author = Martin Larralde | ||
author_email = [email protected] | ||
url = https://github.com/althonos/mini3di | ||
description = A NumPy port of the foldseek code for encoding structures to 3di. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
license = MIT | ||
platform = posix | ||
keywords = bioinformatics, protein, structure, foldseek, 3di | ||
classifier = | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Programming Language :: Python :: Implementation :: PyPy | ||
Topic :: Scientific/Engineering :: Bio-Informatics | ||
Topic :: Scientific/Engineering :: Medical Science Apps. | ||
Typing :: Typed | ||
project_urls = | ||
Bug Tracker = https://github.com/althonos/mini3di/issues | ||
Changelog = https://github.com/althonos/mini3di/blob/master/CHANGELOG.md | ||
Coverage = https://codecov.io/gh/althonos/mini3di/ | ||
Builds = https://github.com/althonos/mini3di/actions | ||
PyPI = https://pypi.org/project/mini3di | ||
|
||
[options] | ||
zip_safe = true | ||
packages = mini3di | ||
python_requires = >=3.7 | ||
test_suite = tests | ||
include_package_data = true | ||
setup_requires = setuptools >=46.4 | ||
|
||
[options.package_data] | ||
mini3di = py.typed, *.kerasify | ||
|
||
[bdist_wheel] | ||
universal = true | ||
|
||
# --- Python tools configuration --------------------------------------------- | ||
|
||
[coverage:report] | ||
include = mini3di/*.py | ||
show_missing = true | ||
exclude_lines = | ||
pragma: no cover | ||
if typing.TYPE_CHECKING: | ||
@abc.abstractmethod | ||
@abc.abstractproperty | ||
raise NotImplementedError | ||
return NotImplemented | ||
|
||
[mypy] | ||
disallow_any_decorated = true | ||
disallow_any_generics = true | ||
disallow_any_unimported = false | ||
disallow_subclassing_any = false | ||
disallow_untyped_calls = true | ||
disallow_untyped_defs = true | ||
ignore_missing_imports = true | ||
warn_unused_ignores = true | ||
warn_return_any = true |
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,31 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
import configparser | ||
import setuptools | ||
from setuptools.command.sdist import sdist as _sdist | ||
|
||
try: | ||
import astor | ||
except ImportError as err: | ||
astor = err | ||
|
||
|
||
class sdist(_sdist): | ||
"""A `sdist` that generates a `pyproject.toml` on the fly. | ||
""" | ||
|
||
def run(self): | ||
# build `pyproject.toml` from `setup.cfg` | ||
c = configparser.ConfigParser() | ||
c.add_section("build-system") | ||
c.set("build-system", "requires", str(self.distribution.setup_requires)) | ||
c.set("build-system", 'build-backend', '"setuptools.build_meta"') | ||
with open("pyproject.toml", "w") as pyproject: | ||
c.write(pyproject) | ||
# run the rest of the packaging | ||
_sdist.run(self) | ||
|
||
|
||
if __name__ == "__main__": | ||
setuptools.setup(cmdclass=dict(sdist=sdist)) |