| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,57 @@ | |||
| 1 | 1 | [build-system] | |
| 2 | - requires = ["setuptools"] | ||
| 2 | + requires = ["setuptools >= 62.6"] | ||
| 3 | 3 | build-backend = "setuptools.build_meta" | |
| 4 | 4 | ||
| 5 | + [project] | ||
| 6 | + name = "GitPython" | ||
| 7 | + description = "GitPython is a Python library used to interact with Git repositories" | ||
| 8 | + authors = [ | ||
| 9 | + {name = "Sebastian Thiel", email = "byronimo@gmail.com"}, | ||
| 10 | + {name = "Michael Trier", email = "mtrier@gmail.com"}, | ||
| 11 | + ] | ||
| 12 | + readme = "README.md" | ||
| 13 | + requires-python = ">=3.7" | ||
| 14 | + keywords = ["git"] | ||
| 15 | + # license = "BSD-3-Clause" # not done until setuptools >= 77 (Python >= 3.9) | ||
| 16 | + classifiers = [ | ||
| 17 | + "Development Status :: 5 - Production/Stable", | ||
| 18 | + "Environment :: Console", | ||
| 19 | + "Intended Audience :: Developers", | ||
| 20 | + "Operating System :: OS Independent", | ||
| 21 | + "Operating System :: POSIX", | ||
| 22 | + "Operating System :: Microsoft :: Windows", | ||
| 23 | + "Operating System :: MacOS :: MacOS X", | ||
| 24 | + "Typing :: Typed", | ||
| 25 | + "Programming Language :: Python", | ||
| 26 | + "Programming Language :: Python :: 3", | ||
| 27 | + "Programming Language :: Python :: 3.7", | ||
| 28 | + "Programming Language :: Python :: 3.8", | ||
| 29 | + "Programming Language :: Python :: 3.9", | ||
| 30 | + "Programming Language :: Python :: 3.10", | ||
| 31 | + "Programming Language :: Python :: 3.11", | ||
| 32 | + "Programming Language :: Python :: 3.12", | ||
| 33 | + "Programming Language :: Python :: 3.13", | ||
| 34 | + "Programming Language :: Python :: 3.14", | ||
| 35 | + "Programming Language :: Python :: 3.15", | ||
| 36 | + ] | ||
| 37 | + dynamic = ["license", "version", "dependencies", "optional-dependencies"] | ||
| 38 | + | ||
| 39 | + [project.urls] | ||
| 40 | + "Source code" = "https://github.com/gitpython-developers/GitPython" | ||
| 41 | + "Documentation" = "https://gitpython.readthedocs.io/en/stable/" | ||
| 42 | + | ||
| 43 | + [tool.setuptools] | ||
| 44 | + include-package-data = true | ||
| 45 | + | ||
| 46 | + [tool.setuptools.dynamic] | ||
| 47 | + version = {file = "VERSION"} | ||
| 48 | + dependencies = {file = "requirements.txt"} | ||
| 49 | + optional-dependencies."test" = {file = "test-requirements.txt"} | ||
| 50 | + optional-dependencies."doc" = {file = "doc/requirements.txt"} | ||
| 51 | + | ||
| 52 | + [tool.setuptools.packages.find] | ||
| 53 | + include = ["git", "git.*"] | ||
| 54 | + | ||
| 5 | 55 | [tool.pytest.ini_options] | |
| 6 | 56 | addopts = "--cov=git --cov-report=term -rfEX" | |
| 7 | 57 | filterwarnings = "ignore::DeprecationWarning" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | import sys | |
| 6 | 6 | from typing import Sequence | |
| 7 | 7 | ||
| 8 | - from setuptools import setup, find_packages | ||
| 8 | + from setuptools import setup | ||
| 9 | 9 | from setuptools.command.build_py import build_py as _build_py | |
| 10 | 10 | from setuptools.command.sdist import sdist as _sdist | |
| 11 | 11 | ||
@@ -15,10 +15,6 @@ def _read_content(path: str) -> str: | |||
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | 17 | version = _read_content("VERSION").strip() | |
| 18 | - requirements = _read_content("requirements.txt").splitlines() | ||
| 19 | - test_requirements = _read_content("test-requirements.txt").splitlines() | ||
| 20 | - doc_requirements = _read_content("doc/requirements.txt").splitlines() | ||
| 21 | - long_description = _read_content("README.md") | ||
| 22 | 18 | ||
| 23 | 19 | ||
| 24 | 20 | class build_py(_build_py): | |
@@ -62,54 +58,9 @@ def _stamp_version(filename: str) -> None: | |||
| 62 | 58 | print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr) | |
| 63 | 59 | ||
| 64 | 60 | ||
| 61 | + # See pyproject.toml for project metadata | ||
| 65 | 62 | setup( | |
| 66 | 63 | name="GitPython", | |
| 67 | 64 | cmdclass={"build_py": build_py, "sdist": sdist}, | |
| 68 | - version=version, | ||
| 69 | - description="GitPython is a Python library used to interact with Git repositories", | ||
| 70 | - author="Sebastian Thiel, Michael Trier", | ||
| 71 | - author_email="byronimo@gmail.com, mtrier@gmail.com", | ||
| 72 | 65 | license="BSD-3-Clause", | |
| 73 | - url="https://github.com/gitpython-developers/GitPython", | ||
| 74 | - packages=find_packages(include=["git", "git.*"]), | ||
| 75 | - include_package_data=True, | ||
| 76 | - package_dir={"git": "git"}, | ||
| 77 | - python_requires=">=3.7", | ||
| 78 | - install_requires=requirements, | ||
| 79 | - extras_require={ | ||
| 80 | - "test": test_requirements, | ||
| 81 | - "doc": doc_requirements, | ||
| 82 | - }, | ||
| 83 | - zip_safe=False, | ||
| 84 | - long_description=long_description, | ||
| 85 | - long_description_content_type="text/markdown", | ||
| 86 | - classifiers=[ | ||
| 87 | - # Picked from | ||
| 88 | - # http://pypi.python.org/pypi?:action=list_classifiers | ||
| 89 | - # "Development Status :: 1 - Planning", | ||
| 90 | - # "Development Status :: 2 - Pre-Alpha", | ||
| 91 | - # "Development Status :: 3 - Alpha", | ||
| 92 | - # "Development Status :: 4 - Beta", | ||
| 93 | - "Development Status :: 5 - Production/Stable", | ||
| 94 | - # "Development Status :: 6 - Mature", | ||
| 95 | - # "Development Status :: 7 - Inactive", | ||
| 96 | - "Environment :: Console", | ||
| 97 | - "Intended Audience :: Developers", | ||
| 98 | - "Operating System :: OS Independent", | ||
| 99 | - "Operating System :: POSIX", | ||
| 100 | - "Operating System :: Microsoft :: Windows", | ||
| 101 | - "Operating System :: MacOS :: MacOS X", | ||
| 102 | - "Typing :: Typed", | ||
| 103 | - "Programming Language :: Python", | ||
| 104 | - "Programming Language :: Python :: 3", | ||
| 105 | - "Programming Language :: Python :: 3.7", | ||
| 106 | - "Programming Language :: Python :: 3.8", | ||
| 107 | - "Programming Language :: Python :: 3.9", | ||
| 108 | - "Programming Language :: Python :: 3.10", | ||
| 109 | - "Programming Language :: Python :: 3.11", | ||
| 110 | - "Programming Language :: Python :: 3.12", | ||
| 111 | - "Programming Language :: Python :: 3.13", | ||
| 112 | - "Programming Language :: Python :: 3.14", | ||
| 113 | - "Programming Language :: Python :: 3.15", | ||
| 114 | - ], | ||
| 115 | 66 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,7 @@ | |||
| 5 | 5 | import functools | |
| 6 | 6 | import os | |
| 7 | 7 | import subprocess | |
| 8 | + import sys | ||
| 8 | 9 | ||
| 9 | 10 | from test.lib import TestBase, VirtualEnvironment, requires_symlinks, with_rw_directory | |
| 10 | 11 | ||
@@ -49,14 +50,17 @@ def _set_up_venv(rw_dir): | |||
| 49 | 50 | target_is_directory=True, | |
| 50 | 51 | ) | |
| 51 | 52 | ||
| 53 | + # Turn warnings into exceptions except for Python 3.7 | ||
| 54 | + pywarnings = "error" if tuple(sys.version_info)[0:2] > (3, 7) else "default" | ||
| 55 | + | ||
| 52 | 56 | # Create a convenience function to run commands in it. | |
| 53 | 57 | run = functools.partial( | |
| 54 | 58 | subprocess.run, | |
| 55 | 59 | stdout=subprocess.PIPE, | |
| 56 | 60 | stderr=subprocess.PIPE, | |
| 57 | 61 | universal_newlines=True, | |
| 58 | 62 | cwd=venv.sources, | |
| 59 | - env={**os.environ, "PYTHONWARNINGS": "error"}, | ||
| 63 | + env={**os.environ, "PYTHONWARNINGS": pywarnings}, | ||
| 60 | 64 | ) | |
| 61 | 65 | ||
| 62 | 66 | return venv, run | |
| Back | FazBrowse Home | New Git URL |
0 commit comments