Skip to content

Commit b2eca71

Browse files
authored
Use pep517/518 build system for modern build isolation (#1495)
- Remove pvlib/_version.py (versioneer) - Use importlib.metadata to retrieve version from PKG-INFO - Add importlib-metadata backport for python < 3.8 - Create pyproject.toml with setuptools build backend - Update workflow to use pypa/build module to build sdist & wheel - Update remove versioneer files from .lgtm.yml & .stickler.yml - Remove include from MANIFEST.IN (already included with setuptools-scm)
1 parent 4d75e25 commit b2eca71

File tree

13 files changed

+43
-2326
lines changed

13 files changed

+43
-2326
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[run]
2-
omit = pvlib/_version.py
2+
omit = pvlib/version.py

.gitattributes

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
pvlib/version.py export-subst
2-
31
# reduce the number of merge conflicts
42
docs/sphinx/source/whatsnew/* merge=union

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Install build tools
2626
run: |
2727
python -m pip install --upgrade pip
28-
python -m pip install --upgrade setuptools wheel
28+
python -m pip install build
2929
3030
- name: Build packages
31-
run: python setup.py sdist bdist_wheel
31+
run: python -m build
3232

3333
# only publish distribution to PyPI for tagged commits
3434
- name: Publish distribution to PyPI

.lgtm.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
path_classifiers:
2-
generated:
3-
- pvlib/_version.py
42
library:
5-
- versioneer.py
63
- pvlib/_deprecation.py

.stickler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ linters:
55
ignore: E201,E241,E226,W503,W504
66
files:
77
ignore:
8-
- 'pvlib/_version.py'
8+
- 'pvlib/version.py'

MANIFEST.in

-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
include MANIFEST.in
2-
include AUTHORS.md
3-
include LICENSE
4-
include README.md
5-
include setup.py
6-
7-
# include most everything under pvlib by default
8-
# better to package too much than not enough
9-
graft pvlib
10-
11-
# we included pvlib files needed to compile NREL SPA code in graft above,
12-
# now we exclude the NREL code itself to comply with their license
131
global-exclude */spa.c
142
global-exclude */spa.h
153
prune pvlib/spa_c_files/build
164

17-
graft docs
185
prune docs/sphinx/build
196
prune docs/sphinx/source/generated
207
# all doc figures created by doc build
@@ -30,6 +17,3 @@ global-exclude .DS_Store
3017
global-exclude .git*
3118
global-exclude \#*
3219
global-exclude .ipynb_checkpoints
33-
34-
include versioneer.py
35-
include pvlib/_version.py

docs/sphinx/source/whatsnew/v0.9.2.rst

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Enhancements
1717
* Improve error message about uneven time intervals for
1818
:py:func:`~pvlib.clearsky.detect_clearsky` and :py:func:`~pvlib.temperature.prilliman`
1919
(:issue:`1476`, :pull:`1490`)
20+
* Add support for `PEP517 <https://peps.python.org/pep-0517/>`_ & `PEP518 <https://peps.python.org/pep-0518/>`_
21+
with setuptools build backend. (:pull:`1495`)
2022

2123
Bug fixes
2224
~~~~~~~~~

0 commit comments

Comments
 (0)