diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ea5edf21..54a3f40184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - [docs] Add more examples - [dev] Change github action job names - [docs] Add additional examples for installation from git repos +- [packaging] Switch to [PEP 621](https://www.python.org/dev/peps/pep-0621/) ## 1.0.0 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 4351b0e610..0000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,14 +0,0 @@ -graft src -include *.md pipx_demo.gif logo.png LICENSE - -exclude .isort.cfg .pre-commit-config.yaml get-pipx.py makefile generate_docs.py .flake8 mkdocs.yml noxfile.py .coveragerc .deepsource.toml -recursive-exclude testdata * - -prune templates -prune tests -prune docs -prune scripts - -global-exclude *.py[cod] -global-exclude __pycache__ -global-exclude .*.swp diff --git a/noxfile.py b/noxfile.py index e1101406a6..4c04ca64b3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -14,7 +14,6 @@ "flake8-bugbear==21.11.29", "mypy==0.930", "types-jinja2", - "check-manifest==0.47", "packaging>=20.0", "isort==5.10.1", ] @@ -173,8 +172,6 @@ def lint(session): "--warn-unused-ignores", *files, ) - session.run("check-manifest") - session.run("python", "setup.py", "check", "--metadata", "--strict") @nox.session(python=PYTHON_ALL_VERSIONS) diff --git a/pyproject.toml b/pyproject.toml index 3198dd9257..6167b80847 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,55 @@ [build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling>=0.15.0"] +build-backend = "hatchling.build" + +[project] +name = "pipx" +description = "Install and Run Python Applications in Isolated Environments" +readme = "README.md" +license = "MIT" +requires-python = ">=3.7" +keywords = ["pip", "install", "cli", "workflow", "Virtual Environment"] +authors = [{ name = "Chad Smith", email = "chadsmith.software@gmail.com" }] +classifiers = [ + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] +dependencies = [ + "argcomplete>=1.9.4", + "colorama>=0.4.4; sys_platform == 'win32'", + "importlib-metadata>=3.3.0; python_version < '3.8'", + "packaging>=20.0", + "userpath>=1.6.0", +] +dynamic = ["version"] + +[project.urls] +Documentation = "https://pypa.github.io/pipx/" +"Source Code" = "https://github.com/pypa/pipx" +"Bug Tracker" = "https://github.com/pypa/pipx/issues" + +[project.scripts] +pipx = "pipx.main:cli" + +[tool.hatch.version] +source = "code" +path = "src/pipx/version.py" + +[tool.hatch.build.targets.sdist] +include = ["/src", "/logo.png", "/pipx_demo.gif", "/*.md"] [tool.isort] profile = "black" known_first_party = ["helpers", "package_info"] [tool.pytest.ini_options] -markers = [ - "all_packages: test install with maximum number of packages", -] +markers = ["all_packages: test install with maximum number of packages"] [tool.black] skip-magic-trailing-comma = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5c1641fccf..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,45 +0,0 @@ -[metadata] -name = pipx -version = attr: pipx.version.__version__ -author = Chad Smith -author_email = Chad Smith -description = Install and Run Python Applications in Isolated Environments -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/pypa/pipx -project_urls = - Documentation = https://pypa.github.io/pipx/ - Source Code = https://github.com/pypa/pipx - Bug Tracker = https://github.com/pypa/pipx/issues -keywords = pip, install, cli, workflow, Virtual Environment -license = License :: OSI Approved :: MIT License -classifiers = - Operating System :: OS Independent - License :: OSI Approved :: MIT License - Programming Language :: Python - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3 :: Only - -[options] -packages = find: -package_dir = - = src -include_package_data = true -zip_safe = true -python_requires = >=3.6 -install_requires = - colorama>=0.4.4;sys_platform=="win32" - userpath>=1.6.0 - argcomplete>=1.9.4 - packaging>=20.0 - importlib-metadata>=3.3.0; python_version < '3.8' - -[options.packages.find] -where = src - -[options.entry_points] -console_scripts = - pipx = pipx.main:cli diff --git a/setup.py b/setup.py deleted file mode 100755 index 4024e697e5..0000000000 --- a/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -from setuptools import setup # type: ignore - -if sys.version_info < (3, 6, 0): - sys.exit( - "Python 3.6 or later is required. " - "See https://github.com/pypa/pipx " - "for installation instructions." - ) - -setup()