diff --git a/.circleci/prepare.sh b/.circleci/prepare.sh index 7256c8c3..9e18a7de 100644 --- a/.circleci/prepare.sh +++ b/.circleci/prepare.sh @@ -4,6 +4,6 @@ set -o xtrace $PYTHON --version $PYTHON -m pip --version $PYTHON -m virtualenv -p $PYTHON venv -venv/bin/python -m pip install -r requirements-dev.txt +venv/bin/python -m pip install -e ".[dev]" venv/bin/python -m pip freeze venv/bin/python --version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9d6f7ec..83ee1f9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies run: | - python -m pip install -r requirements-dev.txt + python -m pip install -e ".[dev]" - name: Install Visual C++ for Python 2.7 if: runner.os == 'Windows' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7398bd3f..4d6cd176 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,5 +11,5 @@ linux: DOCKER_TLS_CERTDIR: "" script: - curl -sSL https://get.docker.com/ | sh - - python -m pip install -r requirements-dev.txt + - python -m pip install -e ".[dev]" - python ./bin/run_tests.py diff --git a/.readthedocs.yml b/.readthedocs.yml index 301901d8..21c669a9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,4 +8,7 @@ mkdocs: python: version: 3.7 install: - - requirements: requirements-dev.txt + - method: pip + path: . + extra_requirements: + - dev diff --git a/.travis.yml b/.travis.yml index 6e4925f8..1a866ea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,6 @@ jobs: # must repeat the s390x job above exactly to match - *linux_s390x_36 -install: $PYTHON -m pip install -r requirements-dev.txt pytest-custom-exit-code +install: $PYTHON -m pip install -e ".[dev]" pytest-custom-exit-code script: $PYTHON ./bin/run_tests.py diff --git a/appveyor.yml b/appveyor.yml index acc69fdf..080908a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,7 @@ init: $env:PYTEST_ADDOPTS='-k "unit_test or test_0_basic" --suppress-no-test-exit-code' } -install: python -m pip install -r requirements-dev.txt pytest-custom-exit-code +install: python -m pip install -e ".[dev]" pytest-custom-exit-code # the '-u' flag is required so the output is in the correct order. # See https://github.com/joerick/cibuildwheel/pull/24 for more info. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 74dc215d..b144c2db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ jobs: inputs: versionSpec: '3.8' - bash: | - python -m pip install -r requirements-dev.txt pytest-azurepipelines + python -m pip install -e ".[dev]" pytest-azurepipelines python ./bin/run_tests.py - job: macos_38 @@ -16,7 +16,7 @@ jobs: inputs: versionSpec: '3.8' - bash: | - python -m pip install -r requirements-dev.txt pytest-azurepipelines + python -m pip install -e ".[dev]" pytest-azurepipelines python ./bin/run_tests.py - job: windows_36 @@ -29,7 +29,7 @@ jobs: - script: choco install vcpython27 -f -y displayName: Install Visual C++ for Python 2.7 - bash: | - python -m pip install -r requirements-dev.txt pytest-azurepipelines + python -m pip install -e ".[dev]" pytest-azurepipelines python ./bin/run_tests.py - job: windows_38 @@ -42,5 +42,5 @@ jobs: - script: choco install vcpython27 -f -y displayName: Install Visual C++ for Python 2.7 - bash: | - python -m pip install -r requirements-dev.txt pytest-azurepipelines + python -m pip install -e ".[dev]" pytest-azurepipelines python ./bin/run_tests.py diff --git a/bin/bump_version.py b/bin/bump_version.py index 2330efda..4d9e6c9e 100755 --- a/bin/bump_version.py +++ b/bin/bump_version.py @@ -17,7 +17,7 @@ config = [ ('docs/faq.md', "cibuildwheel@v{}"), ('docs/setup.md', "cibuildwheel@v{}"), ('examples/*', "cibuildwheel=={}"), - ('setup.py', "version='{}'"), + ('setup.cfg', "version = {}"), ] diff --git a/docs/contributing.md b/docs/contributing.md index 98f23237..329a355c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -32,8 +32,21 @@ So, if we can, I'd like to improve the experience on errors as well. In [this](h Maintainer notes ---------------- +## Local testing + +You should run: + +```python +python3 -m venv venv +. venv/bin/activate +pip install -e .[dev] +``` + +To prepare a development environment. + ## Testing minimal configs + cibuildwheel's _minimal_ example configs can be tested on a simple project on cibuildwheel's existing CI. These should be run whenever the minimal configs change. To test minimal configs, make sure you have a clean git repo, then run the script: @@ -48,6 +61,8 @@ The script then outputs a Markdown table that can be copy/pasted into a PR to mo ## Preparing environments +This has been moved to using docker, so you only need the following instructions if you add `--no-docker` to avoid using docker. + The dependency update script in the next section requires multiple python versions installed. One way to do this is to use `pyenv`: ```bash diff --git a/requirements-dev.txt b/requirements-dev.txt index 304cf212..aefbcb6d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1 @@ --e . -pytest -pytest-timeout -mkdocs==1.0.4 -mkdocs-include-markdown-plugin==2.1.1 -pymdown-extensions -pip-tools -requests -click -mypy -pyyaml -pygithub -typing-extensions +-e .[dev] diff --git a/setup.cfg b/setup.cfg index 8202be43..66b6ee2d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,64 @@ +[metadata] + +name = cibuildwheel +version = 1.7.4 +description = Build Python wheels on CI with minimal configuration. +long_description = file: README.md +long_description_content_type = text/markdown +author = Joe Rickerby +author_email = joerick@mac.com +url = https://github.com/joerick/cibuildwheel +license = BSD +classifiers = + Intended Audience :: Developers + Natural Language :: English + Programming Language :: Python :: 3 + Development Status :: 5 - Production/Stable + License :: OSI Approved :: BSD License + Programming Language :: Python :: Implementation :: CPython + Topic :: Software Development :: Build Tools +project_urls = + Changelog=https://github.com/joerick/cibuildwheel#changelog + Documentation=https://cibuildwheel.readthedocs.io/ +keywords = ci,wheel,packaging,pypi,travis,appveyor,macos,linux,windows + +[options] +packages = find: +zip_safe = False +include_package_data = True +python_requires = >=3.6 +install_requires = + bashlex!=0.13 + toml + certifi + +[options.package_data] +cibuildwheel = resources/* + +[options.extras_require] +dev = + click + mkdocs-include-markdown-plugin==2.1.1 + mkdocs==1.0.4 + mypy + pip-tools + pygithub + pymdown-extensions + pytest + pytest-timeout + pyyaml + requests + typing-extensions + +[options.packages.find] +include = + cibuildwheel + +[options.entry_points] +console_scripts = + cibuildwheel = cibuildwheel.__main__:main + + [flake8] ignore = E501,W503,E741,E226,B950 select = C,E,F,W,B,B9 diff --git a/setup.py b/setup.py index 1a0c6d89..b694e6e4 100644 --- a/setup.py +++ b/setup.py @@ -1,49 +1,5 @@ # -*- coding: utf-8 -*- -from pathlib import Path -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup -this_directory = Path(__file__).parent -long_description = (this_directory / 'README.md').read_text(encoding='utf-8') - -setup( - name='cibuildwheel', - version='1.7.4', - install_requires=['bashlex!=0.13', 'toml', 'certifi'], - description="Build Python wheels on CI with minimal configuration.", - long_description=long_description, - long_description_content_type='text/markdown', - author="Joe Rickerby", - author_email='joerick@mac.com', - url='https://github.com/joerick/cibuildwheel', - project_urls={ - 'Changelog': 'https://github.com/joerick/cibuildwheel#changelog', - 'Documentation': 'https://cibuildwheel.readthedocs.io/', - }, - packages=['cibuildwheel', ], - license="BSD", - zip_safe=False, - package_data={ - 'cibuildwheel': ['resources/*'], - }, - # Supported python versions - python_requires='>=3.6', - keywords='ci wheel packaging pypi travis appveyor macos linux windows', - classifiers=[ - 'Intended Audience :: Developers', - 'Natural Language :: English', - 'Programming Language :: Python :: 3', - 'Development Status :: 5 - Production/Stable', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: Implementation :: CPython', - 'Topic :: Software Development :: Build Tools', - ], - entry_points={ - 'console_scripts': [ - 'cibuildwheel = cibuildwheel.__main__:main', - ], - }, -) +setup()