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 diff --git a/MANIFEST.in b/MANIFEST.in index dac24d8677..d907e04a7b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,3 +17,15 @@ global-exclude .DS_Store global-exclude .git* global-exclude \#* global-exclude .ipynb_checkpoints + +exclude .coveragerc +exclude .lgtm.yml +exclude .stickler.yml +exclude codecov.yml +exclude readthedocs.yml +exclude CODE_OF_CONDUCT.md + +prune paper +prune .github +prune benchmarks +prune ci diff --git a/setup.py b/setup.py index c67f490321..2abd339723 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys try: - from setuptools import setup + from setuptools import setup, find_namespace_packages from setuptools.extension import Extension except ImportError: raise RuntimeError('setuptools is required') @@ -82,7 +82,17 @@ } # set up pvlib packages to be installed and extensions to be compiled -PACKAGES = ['pvlib'] + +# 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. Although note that "docs" does get added separately +# via the MANIFEST.in spec. +PACKAGES = find_namespace_packages(include=['pvlib*']) extensions = []