Skip to content

Commit

Permalink
Merge pull request #73 from mgorny/flit_core
Browse files Browse the repository at this point in the history
Switch the build system to flit_core
  • Loading branch information
cpburnz committed Jan 22, 2023
2 parents 8a7c8fc + 8608ab5 commit 33a3fc6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
2 changes: 0 additions & 2 deletions README-dist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Installation
required:

- `build`_ (>=0.6.0)
- `setuptools`_ (>=40.8.0)

*pathspec* can then be built and installed with::

Expand All @@ -146,7 +145,6 @@ required:

.. _`PyPI`: http://pypi.python.org/pypi/pathspec
.. _`build`: https://pypi.org/project/build/
.. _`setuptools`: https://pypi.org/project/setuptools/


Documentation
Expand Down
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Installation
required:

- `build`_ (>=0.6.0)
- `setuptools`_ (>=40.8.0)

*pathspec* can then be built and installed with::

Expand All @@ -146,7 +145,6 @@ required:

.. _`PyPI`: http://pypi.python.org/pypi/pathspec
.. _`build`: https://pypi.org/project/build/
.. _`setuptools`: https://pypi.org/project/setuptools/


Documentation
Expand Down
6 changes: 3 additions & 3 deletions prebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def generate_setup_cfg() -> None:
'long_description_content_type': "text/x-rst",
'name': config['project']['name'],
'url': config['project']['urls']['Source Code'],
'version': f"attr: {config['tool']['setuptools']['dynamic']['version']['attr']}",
'version': "attr: pathspec._meta.__version__",
}
output['options'] = {
'packages': "find:",
'python_requires': config['project']['requires-python'],
'setup_requires': ", ".join(config['build-system']['requires']),
'setup_requires': "setuptools>=40.8.0",
'test_suite': "tests",
}
output['options.packages.find'] = {
'include': ", ".join(config['tool']['setuptools']['packages']['find']['include'])
'include': "pathspec, pathspec.*",
}

with open("setup.cfg", 'w', encoding='utf8') as fh:
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=40.8.0"]
build-backend = "flit_core.buildapi"
requires = ["flit_core >=3.2,<4"]

[project]
authors = [
Expand Down Expand Up @@ -34,9 +34,3 @@ requires-python = ">=3.7"
"Source Code" = "https://github.com/cpburnz/python-pathspec"
"Documentation" = "https://python-path-specification.readthedocs.io/en/latest/index.html"
"Issue Tracker" = "https://github.com/cpburnz/python-pathspec/issues"

[tool.setuptools.dynamic]
version = {attr = "pathspec._meta.__version__"}

[tool.setuptools.packages.find]
include = ["pathspec", "pathspec.*"]

0 comments on commit 33a3fc6

Please sign in to comment.