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

TST: Test that packages can be build from sdists. #532

Merged
merged 28 commits into from
Feb 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d095c29
TST: Test that packages can be build from sdists.
DWesl Jan 31, 2022
8970ab5
BLD: Include requirements files in sdist.
DWesl Jan 31, 2022
a24498e
BLD: List build dependencies in pyproject.toml
DWesl Jan 31, 2022
6b1ee2b
Complete MANIFEST.in
molinav Feb 4, 2022
6370cbb
Simplify pyproject.toml
molinav Feb 4, 2022
16d062b
Merge branch 'develop' into build-from-sdist
molinav Feb 4, 2022
9cec59e
Revert changes in basemap-for-manylinux workflow
molinav Feb 4, 2022
9757a10
Revert changes in basemap-for-windows workflow
molinav Feb 4, 2022
2b23126
CI: Use build to create the basemap wheels.
DWesl Feb 4, 2022
48b9ca7
BLD: Add version specifiers for NumPy and Cython to pyproject.toml fo…
DWesl Feb 4, 2022
8bee972
BLD: Simplify the cython requirements in pyproject.toml
DWesl Feb 4, 2022
47b5ebb
CI: Use build to create basemap-data{,-hires} wheels.
DWesl Feb 4, 2022
5eff00f
CI: Specify C99 standard for building wheel
DWesl Feb 4, 2022
0940037
BLD: Specify sdist format as zip for all packages
DWesl Feb 4, 2022
9dce170
BLD: Include setup.cfg in MANIFEST.in
DWesl Feb 4, 2022
3225eb4
CI: Build sdist with setup.py; wheel from sdist with pip
DWesl Feb 5, 2022
b0723cf
Revert adding setup.cfg to MANIFEST files
molinav Feb 5, 2022
76ad3cb
Remove redundant code in setup to force zip sdist
molinav Feb 5, 2022
9b2795b
Remove trailing slash
molinav Feb 5, 2022
b3b4821
Update pyproject.toml
molinav Feb 5, 2022
cad118a
Fix wildcard expansion not taking place in PowerShell
molinav Feb 5, 2022
03dfeb0
Update pip wheel call in basemap-for-manylinux workflow
molinav Feb 5, 2022
d27ad85
Fix wrong path to zip file in basemap-for-windows workflow
molinav Feb 5, 2022
1a18b28
Test sdists for basemap-data and basemap-data-hires
molinav Feb 5, 2022
863787e
BLD: Don't include python3.2 requirements in setup_requires if not on…
DWesl Feb 5, 2022
30e1243
Merge remote-tracking branch 'origin/build-from-sdist' into build-fro…
DWesl Feb 5, 2022
fcb8289
Revert changes in basemap-data and basemap-data-hires workflows
molinav Feb 5, 2022
403c521
Fix basemap-for-windows build step if compiling numpy
molinav Feb 5, 2022
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
5 changes: 3 additions & 2 deletions .github/workflows/basemap-data-hires.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
name: checkout
path: .
-
name: Build wheel
name: Build sdist and wheel
run: |
cd ${{ env.PKGDIR }}
python setup.py sdist bdist_wheel
python setup.py sdist
pip wheel -w dist --no-deps dist/*.zip
-
name: Upload build artifacts
uses: actions/upload-artifact@v1
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/basemap-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
name: checkout
path: .
-
name: Build wheel
name: Build sdist and wheel
run: |
cd ${{ env.PKGDIR }}
python setup.py sdist bdist_wheel
python setup.py sdist
pip wheel -w dist --no-deps dist/*.zip
-
name: Upload build artifacts
uses: actions/upload-artifact@v1
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/basemap-for-manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ jobs:
name: Build wheel
run: |
cd ${{ env.PKGDIR }}
export GEOS_DIR=extern
export NUMPY_INCLUDE_PATH=extern/include
export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
export NUMPY_INCLUDE_PATH="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern/include"
export CFLAGS="-std=c99"
pip install -r requirements-setup.txt
python setup.py sdist bdist_wheel
python setup.py sdist
pip wheel -w dist --no-deps dist/*.zip
-
name: Upload build artifacts
uses: actions/upload-artifact@v1
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/basemap-for-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ jobs:
name: Build wheel
run: |
cd ${{ env.PKGDIR }}
$env:GEOS_DIR = "extern"
$env:NUMPY_INCLUDE_PATH = "extern/include"
$env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern"
$env:NUMPY_INCLUDE_PATH = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern/include"
$env:SETUPTOOLS_USE_DISTUTILS = "stdlib"
pip install -r requirements-setup.txt
python setup.py sdist bdist_wheel
python setup.py sdist
pip wheel -w dist --no-deps (Get-Item dist/*.zip)
-
name: Upload build artifacts
uses: actions/upload-artifact@v1
Expand Down
8 changes: 8 additions & 0 deletions packages/basemap/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include requirements*.txt
recursive-include doc *
recursive-exclude doc/build *
recursive-include test *
recursive-include utils *.py
recursive-exclude **/__pycache__ *
exclude **/*.pyc
exclude **/.gitkeep
11 changes: 11 additions & 0 deletions packages/basemap/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = [
'setuptools',
'wheel',
'oldest-supported-numpy; python_version >= "3.5"',
'numpy == 1.16.6; python_version == "3.4" or python_version == "2.7"',
'numpy == 1.11.3; python_version == "3.3" or python_version == "3.2" or python_version == "2.6"',
'cython >= 0.29, < 3.1; python_version >= "3.3" or python_version <= "3.0"',
'cython >= 0.26, < 0.27; python_version == "3.2"'
]
build-backend = "setuptools.build_meta"
3 changes: 3 additions & 0 deletions packages/basemap/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ license_files =
LICENSE
LICENSE.geos

[sdist]
formats = zip

[flake8]
ignore =
E301,E306,E402,E501,E731,W503,W504
Expand Down
13 changes: 4 additions & 9 deletions packages/basemap/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ def run(self):
finally:
self.distribution.data_files = orig_data_files

def initialize_options(self):
"""Call `initialize_options` and then set zip as default format."""

sdist.initialize_options(self)
self._default_to_zip()

def _default_to_zip(self):
self.formats = ["zip"]


# Initialise include and library dirs.
data_files = []
Expand Down Expand Up @@ -160,6 +151,10 @@ def _default_to_zip(self):
item.replace(marker1, "").replace(marker2, "") for item in install_requires
if item.endswith(marker1) or item.endswith(marker2)
or "python_version" not in item]
else:
marker1 = '; python_version == "3.2"'
setup_requires = [item for item in setup_requires if not item.endswith(marker1)]
install_requires = [item for item in install_requires if not item.endswith(marker1)]

setup(**{
"name":
Expand Down
3 changes: 3 additions & 0 deletions packages/basemap_data/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ license_files =
LICENSE.epsg
LICENSE.mit

[sdist]
formats = zip

[bdist_wheel]
universal = 1
17 changes: 0 additions & 17 deletions packages/basemap_data/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import itertools
from setuptools import setup
from setuptools import find_packages
from setuptools.command.sdist import sdist


def get_content(name, splitlines=False):
Expand All @@ -23,19 +22,6 @@ def get_content(name, splitlines=False):
return content


class sdist_zip(sdist):
"""Custom `sdist` that saves source distributions in zip format."""

def initialize_options(self):
"""Call `initialize_options` and then set zip as default format."""

sdist.initialize_options(self)
self._default_to_zip()

def _default_to_zip(self):
self.formats = ["zip"]


# Define some helper lists.
basenames = [
"countries",
Expand Down Expand Up @@ -140,9 +126,6 @@ def _default_to_zip(self):
"!=3.1.*",
"<4",
]),
"cmdclass": {
"sdist": sdist_zip,
},
"project_urls": {
"Bug Tracker":
"https://github.com/matplotlib/basemap/issues",
Expand Down
3 changes: 3 additions & 0 deletions packages/basemap_data_hires/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ license_files =
COPYING
COPYING.LESSER

[sdist]
formats = zip

[bdist_wheel]
universal = 1
17 changes: 0 additions & 17 deletions packages/basemap_data_hires/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import itertools
from setuptools import setup
from setuptools import find_packages
from setuptools.command.sdist import sdist


def get_content(name, splitlines=False):
Expand All @@ -23,19 +22,6 @@ def get_content(name, splitlines=False):
return content


class sdist_zip(sdist):
"""Custom `sdist` that saves source distributions in zip format."""

def initialize_options(self):
"""Call `initialize_options` and then set zip as default format."""

sdist.initialize_options(self)
self._default_to_zip()

def _default_to_zip(self):
self.formats = ["zip"]


# Define some helper lists.
basenames = [
"countries",
Expand Down Expand Up @@ -118,9 +104,6 @@ def _default_to_zip(self):
"!=3.1.*",
"<4",
]),
"cmdclass": {
"sdist": sdist_zip,
},
"project_urls": {
"Bug Tracker":
"https://github.com/matplotlib/basemap/issues",
Expand Down