diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a40c6cb9..884d4181 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,9 +15,9 @@ jobs: with: python-version: 3.x - name: Install dependencies - run: pip install build -e . + run: pip install flit - name: Create packages - run: python -m build -n -s -w . + run: flit build --setup-py - name: Upload packages uses: pypa/gh-action-pypi-publish@master with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb75be7e..a2255e24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: path: ~/.cache/pip key: pip-test-${{ matrix.python-version }}-${{ matrix.os }} - name: Install the project - run: "pip install --no-binary=:all: ." + run: pip install --no-binary=wheel . - name: Install test dependencies run: pip install .[test] coverage[toml] - name: Test with pytest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c5359c3..2ead1fee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,12 +33,11 @@ repos: rev: 21.12b0 hooks: - id: black - args: [--target-version=py37] -- repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 +- repo: https://github.com/csachs/pyproject-flake8 + rev: v0.0.1a2.post1 hooks: - - id: flake8 + - id: pyproject-flake8 additional_dependencies: [flake8-bugbear] - repo: https://github.com/codespell-project/codespell diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 41db5797..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,11 +0,0 @@ -recursive-include src *.py -recursive-include tests *.py *.h *.txt *.c *.dynlib -recursive-include docs *.py *.rst make.bat Makefile -include tests/testdata/test-1.0-py2.py3-none-any.whl -include tox.ini -include manpages/*.rst -include LICENSE.txt -include src/wheel/vendored/vendor.txt -prune tests/testdata/*/build -prune tests/testdata/*/dist -prune tests/testdata/*/*.egg-info diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..749b8de9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,78 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "wheel" +description = "A built-package format for Python" +readme = "README.rst" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: System :: Archiving :: Packaging", + "License :: OSI Approved :: MIT License", + "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" +] +authors = [{name = "Daniel Holth", email = "dholth@fastmail.fm"}] +maintainers = [{name = "Alex Grönholm", email = "alex.gronholm@nextday.fi"}] +keywords = ["wheel", "packaging"] +license = {file = "LICENSE.txt"} +requires-python = ">=3.7" +dependencies = [ + "setuptools >= 45.2.0" +] +dynamic = ["version"] + +[project.urls] +Documentation = "https://wheel.readthedocs.io/" +Changelog = "https://wheel.readthedocs.io/en/stable/news.html" +"Issue Tracker" = "https://github.com/pypa/wheel/issues" + +[project.scripts] +wheel = "wheel.cli:main" + +[project.entry-points."distutils.commands"] +bdist_wheel = "wheel.bdist_wheel:bdist_wheel" + +[project.optional-dependencies] +test = [ + "pytest >= 3.0.0" +] + +[tool.flit.sdist] +exclude = [ + ".cirrus.yml", + ".github/*", + ".gitignore", + ".pre-commit-config.yaml", + ".readthedocs.yml" +] + +[tool.black] +target-version = ['py37'] +extend-exclude = ''' +^/src/wheel/vendored/ +''' + +[tool.isort] +src_paths = ["src"] +profile = "black" +skip_gitignore = true + +[tool.flake8] +max-line-length = 88 + +[tool.pytest.ini_options] +testpaths = "tests" + +[tool.coverage.run] +source = ["wheel"] +omit = ["*/vendored/*"] + +[tool.coverage.report] +show_missing = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 1b71a18c..00000000 --- a/setup.cfg +++ /dev/null @@ -1,66 +0,0 @@ -[metadata] -name = wheel -version = attr: wheel.__version__ -description = A built-package format for Python -long_description = file: README.rst -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Topic :: System :: Archiving :: Packaging - License :: OSI Approved :: MIT License - 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 -author = Daniel Holth -author_email = dholth@fastmail.fm -maintainer = Alex Grönholm -maintainer_email = alex.gronholm@nextday.fi -url = https://github.com/pypa/wheel -project_urls = - Documentation = https://wheel.readthedocs.io/ - Changelog = https://wheel.readthedocs.io/en/stable/news.html - Issue Tracker = https://github.com/pypa/wheel/issues -keywords = wheel, packaging -license = MIT - -[options] -package_dir= - = src -packages = find: -python_requires = >=3.7 -install_requires = setuptools >= 45.2.0 -zip_safe = False - -[options.packages.find] -where = src - -[options.extras_require] -test = - pytest >= 3.0.0 - -[options.entry_points] -console_scripts = - wheel = wheel.cli:main -distutils.commands = - bdist_wheel = wheel.bdist_wheel:bdist_wheel - -[tool:isort] -src_paths = src -profile = black -skip_gitignore = true - -[flake8] -max-line-length = 88 - -[tool:pytest] -testpaths = tests - -[coverage:run] -source = wheel -omit = */vendored/* - -[coverage:report] -show_missing = true diff --git a/setup.py b/setup.py deleted file mode 100644 index a03590f5..00000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -from __future__ import annotations - -from setuptools import setup - -setup() diff --git a/tox.ini b/tox.ini index 65470347..9468d8a3 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ envlist = py37, py38, py39, py310, pypy3.7, lint minversion = 3.3.0 skip_missing_interpreters = true +isolated_build = true [testenv] depends = lint