From 86815002360f4792413ba4391cbbe04a1dbe5fe5 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 16:40:30 -0400 Subject: [PATCH 01/12] Start using twine for dist uploading to PyPI (#259) --- Makefile | 12 ++++++++++-- requirements-dev.txt | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab0bfa3e..a2051585 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,12 @@ check: pydocstyle src/dependency_injector/ pydocstyle examples/ +test-publish: cythonize + # Create distributions + python setup.py sdist + # Upload distributions to PyPI + twine upload --repository testpypi dist/dependency-injector-$(VERSION)* + publish: cythonize # Merge release to master branch git checkout master @@ -75,5 +81,7 @@ 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 + # Create distributions + python setup.py sdist + # Upload distributions to PyPI + twine upload dist/dependency-injector-$(VERSION)* diff --git a/requirements-dev.txt b/requirements-dev.txt index e30132f5..d7af1d66 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,3 +5,5 @@ coverage flake8 pydocstyle sphinx_autobuild +pip +twine From 1ca6f303c967c84ddb90923094c9889832be0bef Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 16:44:01 -0400 Subject: [PATCH 02/12] Update changelog --- docs/main/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 80cff5fe..e9a3a816 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,10 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +Development version +------------------- +- Start using ``twine`` for publishing package on PyPI. + 3.19.0 ------ - Add ``Selector`` provider. From f8b78443f91842fb25b351e251d661dccc3ae1e2 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:00:23 -0400 Subject: [PATCH 03/12] Encrypt slack token at travis config --- .travis.yml | 76 +++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 229c03a0..91f61804 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,43 +1,45 @@ sudo: false -install: - - pip install tox +install: +- pip install tox script: - - tox +- tox language: - - python +- python matrix: 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 + - 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 notifications: - slack: ets-labs:g9OU0r5PXjA5ueeoQw01dVvV + slack: + rooms: + secure: CdWDgKnfYW7vvvoH3nS3yg3TcNZiYLRUyEp6ukQ4rQiiuR4+ltuvyGyFJWgP8r7VVJ9yHkB0jebCKWLUMsAEt1my33B6eMDEVefovpkdh2eJjGswmm80brt0EJULpgwPOtB1U47Mwca8L5jDW4KSv9RypUFRgn8eHDoWw6LKf5g= From 0126fdb5227bd6dadf695a7eaaf8a0d3f52792f1 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:01:52 -0400 Subject: [PATCH 04/12] Remove sudo from travis config --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91f61804..67a65fb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: false install: - pip install tox script: @@ -29,11 +28,9 @@ matrix: 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 From dfe61826b0300d6621e5a65f9172b6c47fe1e62b Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:02:54 -0400 Subject: [PATCH 05/12] Rename matrix to jobs at travis config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67a65fb3..92457f03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ script: - tox language: - python -matrix: +jobs: include: - python: 3.6 env: TOXENV=coveralls DEPENDENCY_INJECTOR_DEBUG_MODE=1 From f84daf646772abc21a2e528bcbc33bfbcec7df9c Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:04:47 -0400 Subject: [PATCH 06/12] Add default os and dist to travis config --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92457f03..2c623254 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +os: +- linux +dist: +- xenial install: - pip install tox script: @@ -28,10 +32,8 @@ jobs: env: TOXENV=py36 - python: 3.7 env: TOXENV=py37 - dist: xenial - python: 3.8 env: TOXENV=py38 - dist: xenial - python: pypy env: TOXENV=pypy - python: pypy3 From 18bac2b1d6e13101273ef1ef6d487e5070342bbf Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:31:01 -0400 Subject: [PATCH 07/12] Fix travis config warnings --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c623254..169d8496 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ os: -- linux + linux dist: -- xenial -install: -- pip install tox -script: -- tox + xenial language: -- python + python +install: + - pip install tox +script: + - tox jobs: include: - python: 3.6 From 75a9f6faf0ad91f2e746a863da0028b1e80fb9cd Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 30 Jun 2020 17:32:16 -0400 Subject: [PATCH 08/12] Update changelog --- docs/main/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index e9a3a816..4be333e0 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -10,6 +10,7 @@ follows `Semantic versioning`_ Development version ------------------- - Start using ``twine`` for publishing package on PyPI. +- Fix Travis CI configuration file warnings. 3.19.0 ------ From 4a82aa18c3c4d29cb79403fee75240e346609806 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 1 Jul 2020 23:16:38 -0400 Subject: [PATCH 09/12] Wheels (#260) * Update .travis.yml * Update .travis.yml * Add cibuildwheel jobs * Point twine to testpypi * Add test suffix to version * Try to fix windows builds * Change version to 3.19.0.a2 * Remove build dependencies from dev requirements * Add condition to trigger build on tags * Bump version to 3.19.0a3 * Target sdist job to publish to testpypi * Upgrade travis config * Bump version to 3.19.0a4 * Return version * Update changelog * Update makefile --- .travis.yml | 79 ++++++++++++++++++++++++++++++++++------- Makefile | 6 +--- docs/main/changelog.rst | 3 ++ requirements-dev.txt | 1 - 4 files changed, 70 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 169d8496..7e1c2980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,43 +1,96 @@ -os: - linux -dist: - xenial -language: - python -install: - - pip install tox -script: - - tox +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 + - 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 --repository testpypi 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 --repository testpypi 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 --repository testpypi 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 --repository testpypi wheelhouse/*.whl notifications: slack: rooms: diff --git a/Makefile b/Makefile index a2051585..746e2735 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ test-publish: cythonize # Upload distributions to PyPI twine upload --repository testpypi dist/dependency-injector-$(VERSION)* -publish: cythonize +tag: # Merge release to master branch git checkout master git merge --no-ff release/$(VERSION) -m "Merge branch 'release/$(VERSION)' into master" @@ -81,7 +81,3 @@ publish: cythonize # Create and upload tag git tag -a $(VERSION) -m 'version $(VERSION)' git push --tags - # Create distributions - python setup.py sdist - # Upload distributions to PyPI - twine upload dist/dependency-injector-$(VERSION)* diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index 4be333e0..eaccf8ea 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -9,6 +9,9 @@ follows `Semantic versioning`_ Development version ------------------- +- 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. diff --git a/requirements-dev.txt b/requirements-dev.txt index d7af1d66..6a587890 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,4 +6,3 @@ flake8 pydocstyle sphinx_autobuild pip -twine From cc90f66dc87365b9f18b02f05b9877c15728e30b Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 1 Jul 2020 23:17:29 -0400 Subject: [PATCH 10/12] Bump version to 3.19.1 --- docs/main/changelog.rst | 4 ++-- src/dependency_injector/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index eaccf8ea..7e22a364 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,8 +7,8 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ -Development version -------------------- +3.19.1 +------ - Start distributing wheels for Linux, MacOS, and Windows (thanks to `Travis CI `_ and `cibuildwheel `_). 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 From 0da9f2c6b511fa7241d6eb81b232cf2b7e78c659 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 1 Jul 2020 23:18:41 -0400 Subject: [PATCH 11/12] Update travis config to publish to real pypi --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e1c2980..b21de242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ jobs: script: python setup.py sdist after_success: - python3 -m pip install twine - - python3 -m twine upload --repository testpypi dist/* + - python3 -m twine upload dist/* - services: docker if: tag IS present env: TWINE_USERNAME=__token__ @@ -69,7 +69,7 @@ jobs: script: python3 -m cibuildwheel --output-dir wheelhouse after_success: - python3 -m pip install twine - - python3 -m twine upload --repository testpypi wheelhouse/*.whl + - python3 -m twine upload wheelhouse/*.whl - os: osx if: tag IS present language: shell @@ -78,7 +78,7 @@ jobs: script: python3 -m cibuildwheel --output-dir wheelhouse after_success: - python3 -m pip install twine - - python3 -m twine upload --repository testpypi wheelhouse/*.whl + - python3 -m twine upload wheelhouse/*.whl - os: windows if: tag IS present language: shell @@ -90,7 +90,7 @@ jobs: script: python -m cibuildwheel --output-dir wheelhouse after_success: - python -m pip install twine - - python -m twine upload --repository testpypi wheelhouse/*.whl + - python -m twine upload wheelhouse/*.whl notifications: slack: rooms: From 5e84f3145e58dd09c5e62d49843d2ed22012a2fd Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 1 Jul 2020 23:20:28 -0400 Subject: [PATCH 12/12] Update makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 746e2735..6c514be9 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ test-publish: cythonize # Upload distributions to PyPI twine upload --repository testpypi dist/dependency-injector-$(VERSION)* -tag: +publish: # Merge release to master branch git checkout master git merge --no-ff release/$(VERSION) -m "Merge branch 'release/$(VERSION)' into master"