Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch the build system to flit_core #73

Merged
merged 2 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.*"]