diff --git a/.travis.yml b/.travis.yml index 229c03a0..b21de242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,43 +1,97 @@ -sudo: false -install: - - pip install tox -script: - - tox -language: - - python -matrix: +os: linux +dist: xenial +language: python +jobs: include: - - python: 3.6 - env: TOXENV=coveralls DEPENDENCY_INJECTOR_DEBUG_MODE=1 - install: - - pip install tox - - pip install cython - - make cythonize - - python: 3.6 - env: TOXENV=pylint - - python: 3.6 - env: TOXENV=flake8 - - python: 3.6 - env: TOXENV=pydocstyle - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - - python: 3.5 - env: TOXENV=py35 - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - sudo: required - dist: xenial - - python: 3.8 - env: TOXENV=py38 - sudo: required - dist: xenial - - python: pypy - env: TOXENV=pypy - - python: pypy3 - env: TOXENV=pypy3 + - python: 3.6 + env: TOXENV=coveralls DEPENDENCY_INJECTOR_DEBUG_MODE=1 + install: + - pip install tox + - pip install cython + - make cythonize + script: tox + - python: 3.6 + env: TOXENV=pylint + install: pip install tox + script: tox + - python: 3.6 + env: TOXENV=flake8 + install: pip install tox + script: tox + - python: 3.6 + env: TOXENV=pydocstyle + install: pip install tox + script: tox + - python: 2.7 + env: TOXENV=py27 + install: pip install tox + script: tox + - python: 3.4 + env: TOXENV=py34 + install: pip install tox + script: tox + - python: 3.5 + env: TOXENV=py35 + install: pip install tox + script: tox + - python: 3.6 + env: TOXENV=py36 + install: pip install tox + script: tox + - python: 3.7 + env: TOXENV=py37 + install: pip install tox + script: tox + - python: 3.8 + env: TOXENV=py38 + install: pip install tox + script: tox + - python: pypy + env: TOXENV=pypy + install: pip install tox + script: tox + - python: pypy3 + env: TOXENV=pypy3 + install: pip install tox + script: tox + - python: 3.8 + if: tag IS present + env: TWINE_USERNAME=__token__ + install: pip install pip --upgrade + script: python setup.py sdist + after_success: + - python3 -m pip install twine + - python3 -m twine upload dist/* + - services: docker + if: tag IS present + env: TWINE_USERNAME=__token__ + install: python3 -m pip install cibuildwheel==1.5.1 + script: python3 -m cibuildwheel --output-dir wheelhouse + after_success: + - python3 -m pip install twine + - python3 -m twine upload wheelhouse/*.whl + - os: osx + if: tag IS present + language: shell + env: TWINE_USERNAME=__token__ + install: python3 -m pip install cibuildwheel==1.5.1 + script: python3 -m cibuildwheel --output-dir wheelhouse + after_success: + - python3 -m pip install twine + - python3 -m twine upload wheelhouse/*.whl + - os: windows + if: tag IS present + language: shell + env: TWINE_USERNAME=__token__ + before_install: + - choco install python --version 3.8.0 + - export PATH="/c/Python38:/c/Python38/Scripts:$PATH" + install: python -m pip install cibuildwheel==1.5.1 + script: python -m cibuildwheel --output-dir wheelhouse + after_success: + - python -m pip install twine + - python -m twine upload wheelhouse/*.whl notifications: - slack: ets-labs:g9OU0r5PXjA5ueeoQw01dVvV + slack: + rooms: + secure: CdWDgKnfYW7vvvoH3nS3yg3TcNZiYLRUyEp6ukQ4rQiiuR4+ltuvyGyFJWgP8r7VVJ9yHkB0jebCKWLUMsAEt1my33B6eMDEVefovpkdh2eJjGswmm80brt0EJULpgwPOtB1U47Mwca8L5jDW4KSv9RypUFRgn8eHDoWw6LKf5g= diff --git a/Makefile b/Makefile index ab0bfa3e..6c514be9 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,13 @@ check: pydocstyle src/dependency_injector/ pydocstyle examples/ -publish: cythonize +test-publish: cythonize + # Create distributions + python setup.py sdist + # Upload distributions to PyPI + twine upload --repository testpypi dist/dependency-injector-$(VERSION)* + +publish: # Merge release to master branch git checkout master git merge --no-ff release/$(VERSION) -m "Merge branch 'release/$(VERSION)' into master" @@ -75,5 +81,3 @@ publish: cythonize # Create and upload tag git tag -a $(VERSION) -m 'version $(VERSION)' git push --tags - # Create and upload build - python setup.py sdist upload diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 80cff5fe..7e22a364 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,14 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +3.19.1 +------ +- Start distributing wheels for Linux, MacOS, and Windows (thanks to + `Travis CI `_ and + `cibuildwheel `_). +- Start using ``twine`` for publishing package on PyPI. +- Fix Travis CI configuration file warnings. + 3.19.0 ------ - Add ``Selector`` provider. diff --git a/requirements-dev.txt b/requirements-dev.txt index e30132f5..6a587890 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,3 +5,4 @@ coverage flake8 pydocstyle sphinx_autobuild +pip diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 22587ddf..9728959f 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Dependency injector top-level package.""" -__version__ = '3.19.0' +__version__ = '3.19.1' """Version number that follows semantic versioning. :type: str