project_dirpath = os.path.abspath(os.path.dirname(__file__)) return os.path.join(project_dirpath, *sub_paths) def read(filename): with open(project_path(filename), mode="rb") as fh: return fh.read().decode("utf-8") packages = setuptools.find_packages(project_path("src")) package_dir = {"": "src"} if any(arg.startswith("bdist") for arg in sys.argv): try: import lib3to6 package_dir = lib3to6.fix(package_dir) except ImportError as ex: if "lib3to6" in str(ex): print("WARNING: 'lib3to6' missing, package will not be universal") else: raise __version__ = "v201809.0017-alpha" __normalized_python_version__ = str(pkg_resources.parse_version(__version__)) long_description = (read("README.rst") + "\n\n" + read("CHANGELOG.rst")) setuptools.setup( name="lib3to6", license="MIT", author="Manuel Barkhau",
# SPDX-License-Identifier: MIT import sys import setuptools import pkg_resources packages = ["test_module"] package_dir = {"": "."} install_requires = ['typing;python_version<"3.5"'] if any(arg.startswith("bdist") for arg in sys.argv): import lib3to6 package_dir = lib3to6.fix( package_dir, target_version="2.7", install_requires=install_requires, ) __version__ = "v201808.1001" __normalized_python_version__ = str(pkg_resources.parse_version(__version__)) setuptools.setup( name="test-module", version=__normalized_python_version__, description="A python3.7 module built with lib3to6", author="Manuel Barkhau", author_email="*****@*****.**", packages=packages, package_dir=package_dir, install_requires=install_requires,
"Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ] package_dir = {"": "src"} is_lib3to6_fix_required = any(arg.startswith("bdist") for arg in sys.argv) if is_lib3to6_fix_required: try: import lib3to6 package_dir = lib3to6.fix(package_dir, target_version="2.7") except ImportError: if sys.version_info < (3, 6): raise else: sys.stderr.write(("WARNING: Creating non-universal bdist, " "this should only be used for development.\n")) setuptools.setup( name="pylint-ignore", license="MIT", author="Manuel Barkhau", author_email="*****@*****.**", url="https://github.com/mbarkhau/pylint-ignore", version="2021.1018", keywords="pylint ignore noise flake8 pep8 linter",