Skip to content

Commit 3bcd63e

Browse files
committed
Use pep517/518 build system for modern build isolation
- 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 f2d14ce commit 3bcd63e

File tree

13 files changed

+44
-2326
lines changed

13 files changed

+44
-2326
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 16 deletions
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Enhancements
1111
* Add :py:func:`pvlib.tracking.calc_surface_orientation` for calculating
1212
single-axis tracker ``surface_tilt`` and ``surface_azimuth`` from
1313
rotation angles. (:issue:`1471`, :pull:`1480`)
14+
* Add support for `PEP517 <https://peps.python.org/pep-0517/>`_ & `PEP518 <https://peps.python.org/pep-0518/>`_
15+
with setuptools build backend. (:pull:`1495`)
1416

1517
Bug fixes
1618
~~~~~~~~~

0 commit comments

Comments
 (0)