From b474912e80b255892953b689a3b8c4efeccfc205 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Sun, 26 Jun 2022 13:13:04 -0400 Subject: [PATCH 1/6] setup.py: use setuptools.find_packages() --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 96b4737515..6529d316ac 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys try: - from setuptools import setup + from setuptools import setup, find_packages from setuptools.extension import Extension except ImportError: raise RuntimeError('setuptools is required') @@ -85,7 +85,7 @@ } # set up pvlib packages to be installed and extensions to be compiled -PACKAGES = ['pvlib'] +PACKAGES = find_packages() + ['pvlib.data'] extensions = [] From 071cc215e2af7c17444b3b8663d0fcdbad784cb6 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 5 Jul 2022 12:02:54 -0400 Subject: [PATCH 2/6] switch to better method; add documentation --- setup.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6529d316ac..f32a0c25fb 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys try: - from setuptools import setup, find_packages + from setuptools import setup, find_namespace_packages from setuptools.extension import Extension except ImportError: raise RuntimeError('setuptools is required') @@ -85,7 +85,16 @@ } # set up pvlib packages to be installed and extensions to be compiled -PACKAGES = find_packages() + ['pvlib.data'] + +# the list of packages is not just the top-level "pvlib", but also +# all sub-packages like "pvlib.bifacial". Here, setuptools's definition of +# "package" is, in effect, any directory you want to include in the +# distribution. So even "pvlib.data" counts as a package, despite +# not having any python code or even an __init__.py. +# setuptools.find_namespace_packages() will find all these directories, +# although to exclude "docs", "ci", etc., we include only names matching +# the "pvlib*" glob. +PACKAGES = find_namespace_packages(include=['pvlib*']) extensions = [] From 6c611765182555dd77832ce5a5b4b9ff1671bdc2 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Tue, 5 Jul 2022 12:06:40 -0400 Subject: [PATCH 3/6] more comment --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f32a0c25fb..eaf8b71c3e 100755 --- a/setup.py +++ b/setup.py @@ -93,7 +93,8 @@ # not having any python code or even an __init__.py. # setuptools.find_namespace_packages() will find all these directories, # although to exclude "docs", "ci", etc., we include only names matching -# the "pvlib*" glob. +# the "pvlib*" glob. Although note that "docs" does get added separately +# via the MANIFEST.in spec. PACKAGES = find_namespace_packages(include=['pvlib*']) extensions = [] From 82ff47e8e8129e5b5e684b6948709ac771c48a30 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 17 Aug 2022 15:43:39 -0400 Subject: [PATCH 4/6] use stable pypi release action should hopefully address and silence this warning: Warning: You are using "pypa/gh-action-pypi-publish@master". The "master" branch of this project has been sunset and will not receive any updates, not even security bug fixes. Please, make sure to use a supported version. If you want to pin to v1 major version, use "pypa/gh-action-pypi-publish@release/v1". If you feel adventurous, you may opt to use use "pypa/gh-action-pypi-publish@unstable/v1" instead. A more general recommendation is to pin to exact tags or commit shas. --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86125ecee4..0363316ee3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,7 +35,7 @@ jobs: # only publish distribution to PyPI for tagged commits - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags/v') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} \ No newline at end of file From 24b4a4c2c970d44d12d7daafb97ca052abe1a055 Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 17 Aug 2022 16:04:16 -0400 Subject: [PATCH 5/6] some pruning --- MANIFEST.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index dac24d8677..1d8522712b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,3 +17,15 @@ global-exclude .DS_Store global-exclude .git* global-exclude \#* global-exclude .ipynb_checkpoints + +prune .coveragerc +prune .lgtm.yml +prune .stickler.yml +prune codecov.yml +prune readthedocs.yml + +prune paper +prune .github +prune CODE_OF_CONDUCT.md +prune benchmarks +prune ci From 70c9ab3e797fed376b6409dcfb4696d948dca60c Mon Sep 17 00:00:00 2001 From: Kevin Anderson Date: Wed, 17 Aug 2022 16:18:41 -0400 Subject: [PATCH 6/6] fix errors --- MANIFEST.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 1d8522712b..d907e04a7b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -18,14 +18,14 @@ global-exclude .git* global-exclude \#* global-exclude .ipynb_checkpoints -prune .coveragerc -prune .lgtm.yml -prune .stickler.yml -prune codecov.yml -prune readthedocs.yml +exclude .coveragerc +exclude .lgtm.yml +exclude .stickler.yml +exclude codecov.yml +exclude readthedocs.yml +exclude CODE_OF_CONDUCT.md prune paper prune .github -prune CODE_OF_CONDUCT.md prune benchmarks prune ci