-
Notifications
You must be signed in to change notification settings - Fork 9
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
3 changed files
with
61 additions
and
153 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ url = "https://github.com/Erotemic/vtool_ibeis" | |
description = "vision tools for IBEIS" | ||
os = [ "linux" ] | ||
ci_pypy_versions = [] | ||
authors = ['Jon Crall', 'Jason Parham', 'Hendrik Weideman', 'Avi Weinstock', 'Zackary Rutfield', 'Chuck Stewart'] | ||
author = ['Jon Crall', 'Jason Parham', 'Hendrik Weideman', 'Avi Weinstock', 'Zackary Rutfield', 'Chuck Stewart'] | ||
author_email="[email protected]" | ||
min_python = 3.7 | ||
version = "{mod_dpath}/__init__.py::__version__" | ||
|
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,3 +1,6 @@ | ||
#!/usr/bin/env python | ||
# Generated by ~/code/xcookie/xcookie/builders/setup.py | ||
# based on part ~/code/xcookie/xcookie/rc/setup.py.in | ||
import sys | ||
from os.path import exists | ||
from setuptools import find_packages | ||
|
@@ -103,6 +106,9 @@ def parse_line(line, dpath=""): | |
if line.startswith("-e "): | ||
info["package"] = line.split("#egg=")[1] | ||
else: | ||
if "--find-links" in line: | ||
# setuptools doesnt seem to handle find links | ||
line = line.split("--find-links")[0] | ||
if ";" in line: | ||
pkgpart, platpart = line.split(";") | ||
# Handle platform specific dependencies | ||
|
@@ -160,52 +166,34 @@ def gen_packages_items(): | |
return packages | ||
|
||
|
||
def native_mb_python_tag(plat_impl=None, version_info=None): | ||
""" | ||
Get the correct manylinux python version tag for this interpreter | ||
Example: | ||
>>> print(native_mb_python_tag()) | ||
>>> print(native_mb_python_tag('PyPy', (2, 7))) | ||
>>> print(native_mb_python_tag('CPython', (3, 8))) | ||
""" | ||
if plat_impl is None: | ||
import platform | ||
|
||
plat_impl = platform.python_implementation() | ||
|
||
if version_info is None: | ||
import sys | ||
|
||
version_info = sys.version_info | ||
|
||
major, minor = version_info[0:2] | ||
ver = "{}{}".format(major, minor) | ||
|
||
if plat_impl == "CPython": | ||
# TODO: get if cp27m or cp27mu | ||
impl = "cp" | ||
if ver == "27": | ||
IS_27_BUILT_WITH_UNICODE = True # how to determine this? | ||
if IS_27_BUILT_WITH_UNICODE: | ||
abi = "mu" | ||
else: | ||
abi = "m" | ||
else: | ||
if sys.version_info[:2] >= (3, 8): | ||
# bpo-36707: 3.8 dropped the m flag | ||
abi = "" | ||
else: | ||
abi = "m" | ||
mb_tag = "{impl}{ver}-{impl}{ver}{abi}".format(**locals()) | ||
elif plat_impl == "PyPy": | ||
abi = "" | ||
impl = "pypy" | ||
ver = "{}{}".format(major, minor) | ||
mb_tag = "{impl}-{ver}".format(**locals()) | ||
else: | ||
raise NotImplementedError(plat_impl) | ||
return mb_tag | ||
# # Maybe use in the future? But has private deps | ||
# def parse_requirements_alt(fpath='requirements.txt', versions='loose'): | ||
# """ | ||
# Args: | ||
# versions (str): can be | ||
# False or "free" - remove all constraints | ||
# True or "loose" - use the greater or equal (>=) in the req file | ||
# strict - replace all greater equal with equals | ||
# """ | ||
# # Note: different versions of pip might have different internals. | ||
# # This may need to be fixed. | ||
# from pip._internal.req import parse_requirements | ||
# from pip._internal.network.session import PipSession | ||
# requirements = [] | ||
# for req in parse_requirements(fpath, session=PipSession()): | ||
# if not versions or versions == 'free': | ||
# req_name = req.requirement.split(' ')[0] | ||
# requirements.append(req_name) | ||
# elif versions == 'loose' or versions is True: | ||
# requirements.append(req.requirement) | ||
# elif versions == 'strict': | ||
# part1, *rest = req.requirement.split(';') | ||
# strict_req = ';'.join([part1.replace('>=', '==')] + rest) | ||
# requirements.append(strict_req) | ||
# else: | ||
# raise KeyError(versions) | ||
# requirements = [r.replace(' ', '') for r in requirements] | ||
# return requirements | ||
|
||
|
||
NAME = "vtool_ibeis" | ||
|
@@ -215,11 +203,6 @@ def native_mb_python_tag(plat_impl=None, version_info=None): | |
if __name__ == "__main__": | ||
setupkw = {} | ||
|
||
if 0: | ||
setupkw["entry_points"] = { | ||
# the console_scripts entry point creates the package CLI | ||
"console_scripts": ["xcookie = xcookie.__main__:main"] | ||
} | ||
setupkw["install_requires"] = parse_requirements("requirements/runtime.txt") | ||
setupkw["extras_require"] = { | ||
"all": parse_requirements("requirements.txt"), | ||
|
@@ -244,28 +227,29 @@ def native_mb_python_tag(plat_impl=None, version_info=None): | |
), | ||
} | ||
|
||
setup( | ||
name=NAME, | ||
version=VERSION, | ||
author=static_parse("__author__", INIT_PATH), | ||
author_email=static_parse("__author_email__", INIT_PATH), | ||
url=static_parse("__url__", INIT_PATH), | ||
description=("The xcookie Module"), | ||
long_description=parse_description(), | ||
long_description_content_type="text/x-rst", | ||
license="Apache 2", | ||
packages=find_packages("."), | ||
python_requires=">=3.7", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
], | ||
**setupkw, | ||
) | ||
setupkw["name"] = NAME | ||
setupkw["version"] = VERSION | ||
setupkw[ | ||
"author" | ||
] = "Jon Crall, Jason Parham, Hendrik Weideman, Avi Weinstock, Zackary Rutfield, Chuck Stewart" | ||
setupkw["author_email"] = "[email protected]" | ||
setupkw["url"] = "https://github.com/Erotemic/vtool_ibeis" | ||
setupkw["description"] = "vision tools for IBEIS" | ||
setupkw["long_description"] = parse_description() | ||
setupkw["long_description_content_type"] = "text/x-rst" | ||
setupkw["license"] = "Apache 2" | ||
setupkw["packages"] = find_packages(".") | ||
setupkw["python_requires"] = ">=3.7" | ||
setupkw["classifiers"] = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: Apache Software License", | ||
"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", | ||
] | ||
setup(**setupkw) |