From a7e58ac3a354e5476beb23200d968ec1cd9d0e7f Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sun, 28 Jul 2019 07:09:40 +0200 Subject: [PATCH 1/2] Keep building packages via setuptools for now While it may make sense to switch to an alternate build system (such as Poetry) at some point, at this early stage it seems prudent to designate setuptools as the build system in pyproject.toml until the more modern build system tooling matures. --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f27dc047..903e4532 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,5 +60,4 @@ markdown = ["markdown"] pelican = "pelican.__main__:main" [build-system] -requires = ["poetry>=0.12"] -build-backend = "poetry.masonry.api" +requires = ["setuptools >= 40.6.0", "wheel"] From 06dee4de581fffddc3e188b9ab8074f6a98bd461 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Sun, 28 Jul 2019 07:15:48 +0200 Subject: [PATCH 2/2] Add AutoPub to auto-publish releases on PR merge Contributors will henceforth be asked to include a `RELEASE.md` file containing the release type and summary of changes, which will be used by the continuous integration (CI) system to automatically publish a new release to PyPI when the pull request is merged. For more details, see: https://github.com/autopub/autopub --- .travis.yml | 23 +++++++++++++++++++++++ CONTRIBUTING.rst | 8 ++++++++ pyproject.toml | 7 +++++++ 3 files changed, 38 insertions(+) diff --git a/.travis.yml b/.travis.yml index 762ada98..a4a1e1f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,31 @@ before_install: install: - pip install tox==2.5.0 script: tox -e $TOX_ENV +before_deploy: + - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then travis_terminate 0; fi' + - pip install githubrelease + - pip install --pre autopub + - autopub check || travis_terminate 0 + - pip install poetry + - pip install twine + - git checkout ${TRAVIS_BRANCH} + - git remote set-url origin https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG +deploy: + provider: script + script: autopub deploy + skip_cleanup: true + on: + branch: master + python: "3.7" notifications: irc: channels: - "irc.freenode.org#pelican" on_success: change +env: + global: + - PYPI_USERNAME=autopub + - secure: "h5V/+YL+CrqvfAesNkSb824Ngk5x+f0eFzj/LBbmnzjvArKAmc6R6WGyx8SDD7WF/PlaTf0M1fH3a7pjIS8Ee+TS1Rb0Lt1HPqUs1yntg1+Js2ZQp3p20wfsDc+bZ4/2g8xLsSMv1EJ4np7/GJ5fXqpSxjr/Xs5LYA7ZLwNNwDw=" + - secure: "GiDFfmjH7uzYNnkjQMV/mIkbRdmgkGmtbFPeaj9taBNA5tPp3IBt3GOOS6UL/zm9xiwu9Xo6sxZWkGzY19Hsdv28YPH34N3abo0QSnz4IGiHs152Hi7Qi6Tb0QkT5D3OxuSIm8LmFL7+su89Q7vBFowrT6HL1Mn8CDDWSj3eqbo=" + - TWINE_USERNAME=$PYPI_USERNAME + - TWINE_PASSWORD=$PYPI_PASSWORD diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 49660ea1..7ae47593 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -97,6 +97,14 @@ Using Git and GitHub For example, if you're hacking on a new feature and find a bugfix that doesn't *require* your new feature, **make a new distinct branch and pull request** for the bugfix. +* Add a ``RELEASE.md`` file in the root of the project that contains the + release type (major, minor, patch) and a summary of the changes that will be + used as the release changelog entry. For example:: + + Release type: minor + + Reload browser window upon changes to content, settings, or theme + * Check for unnecessary whitespace via ``git diff --check`` before committing. * First line of your commit message should start with present-tense verb, be 50 characters or less, and include the relevant issue number(s) if applicable. diff --git a/pyproject.toml b/pyproject.toml index 903e4532..185c605b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,5 +59,12 @@ markdown = ["markdown"] [tool.poetry.scripts] pelican = "pelican.__main__:main" +[tool.autopub] +project-name = "Pelican" +git-username = "botpub" +git-email = "botpub@autopub.rocks" +version-strings = ["setup.py"] +build-system = "setuptools" + [build-system] requires = ["setuptools >= 40.6.0", "wheel"]