Skip to content

Commit

Permalink
xcookie regen
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Jan 29, 2023
1 parent e96ae60 commit ea95093
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 153 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,34 +137,10 @@ jobs:
os: ubuntu-latest
install-extras: tests-strict,runtime-strict,headless-strict
arch: auto
- python-version: '3.7'
os: macOS-latest
install-extras: tests-strict,runtime-strict,headless-strict
arch: auto
- python-version: '3.7'
os: windows-latest
install-extras: tests-strict,runtime-strict,headless-strict
arch: auto
- python-version: '3.11'
os: ubuntu-latest
install-extras: tests-strict,runtime-strict,optional-strict,headless-strict
arch: auto
- python-version: '3.11'
os: macOS-latest
install-extras: tests-strict,runtime-strict,optional-strict,headless-strict
arch: auto
- python-version: '3.11'
os: windows-latest
install-extras: tests-strict,runtime-strict,optional-strict,headless-strict
arch: auto
- python-version: '3.11'
os: macOS-latest
install-extras: tests,headless
arch: auto
- python-version: '3.11'
os: windows-latest
install-extras: tests,headless
arch: auto
- python-version: '3.7'
os: ubuntu-latest
install-extras: tests,optional,headless
Expand All @@ -185,58 +161,6 @@ jobs:
os: ubuntu-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.7'
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.8'
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.9'
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.10'
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.11'
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.7'
os: windows-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.8'
os: windows-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.9'
os: windows-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.10'
os: windows-latest
install-extras: tests,optional,headless
arch: auto
- python-version: '3.11'
os: windows-latest
install-extras: tests,optional,headless
arch: auto
- python-version: pypy-3.7
os: ubuntu-latest
install-extras: tests,optional,headless
arch: auto
- python-version: pypy-3.7
os: macOS-latest
install-extras: tests,optional,headless
arch: auto
- python-version: pypy-3.7
os: windows-latest
install-extras: tests,optional,headless
arch: auto
steps:
- name: Checkout source
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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__"
Expand Down
136 changes: 60 additions & 76 deletions setup.py
100755 → 100644
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"),
Expand All @@ -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)

0 comments on commit ea95093

Please sign in to comment.