From 23fe1a144998ca1dcde6628668df50353283d8ec Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 1 Apr 2018 03:39:34 +0300 Subject: [PATCH 01/16] CI(appveyor.yml): Clear `pip` cache with `remove-old-files.py` --- project_template/appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 5f9b60e..5a675a6 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -87,6 +87,7 @@ test_script: # %CMD_IN_ENV% python setup.py bdist_wheel && # ls dist # ) +# - remove-old-files.py -o 180 %LOCALAPPDATA%\\pip\\Cache # #artifacts: # # Archive the generated packages in the ci.appveyor.com build report -- 2.39.2 From 97a7907086997f092101718824229f41a741a1d6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 1 Apr 2018 03:40:56 +0300 Subject: [PATCH 02/16] CI(appveyor.yml): Upgrade `pip` using `python -m pip` Avoid `WindowsError: [Error 5] Access is denied`. --- project_template/appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 5a675a6..cddc5e5 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -71,8 +71,9 @@ install: - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + - "python -m pip install --upgrade pip setuptools" + - "pip install --upgrade tox ppu" - "pip --version" - - "pip install --upgrade pip setuptools tox ppu" # No build step - we don't have C extensions build: false -- 2.39.2 From 6f0dd1644b34df325a2677f61b2b9e4c0d49886c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 4 Apr 2018 05:45:16 +0300 Subject: [PATCH 03/16] CI(appveyor.yml): pip install --upgrade wheel --- project_template/appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index cddc5e5..0a2e20d 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -84,7 +84,7 @@ test_script: #after_test: # # If tests are successful and we've tested a tag, create binary package # - if "%APPVEYOR_REPO_TAG%" == "true" ( -# pip install wheel && +# pip install --upgrade wheel && # %CMD_IN_ENV% python setup.py bdist_wheel && # ls dist # ) -- 2.39.2 From 8c28dfe718d4df4e5cf9ac4834773e5b539d056a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 4 Apr 2018 06:01:02 +0300 Subject: [PATCH 04/16] Tests(tox): Require tox <= 2.9.1 tox 3+ dropped support of Python 3.3. --- project_template/.travis.yml | 2 +- project_template/appveyor.yml | 2 +- project_template/devscripts/requirements/requirements_tox.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project_template/.travis.yml b/project_template/.travis.yml index 6ca690c..74a6ebc 100644 --- a/project_template/.travis.yml +++ b/project_template/.travis.yml @@ -39,7 +39,7 @@ matrix: - env: TOXENV=pypy install: - - travis_retry pip install --upgrade pip setuptools tox ppu + - travis_retry pip install --upgrade pip setuptools "tox <= 2.9.1" ppu script: - tox diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 0a2e20d..c0606b8 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -72,7 +72,7 @@ install: - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - "python -m pip install --upgrade pip setuptools" - - "pip install --upgrade tox ppu" + - "pip install --upgrade \"tox <= 2.9.1\" ppu" - "pip --version" # No build step - we don't have C extensions diff --git a/project_template/devscripts/requirements/requirements_tox.txt b/project_template/devscripts/requirements/requirements_tox.txt index 9927ea4..2978a0b 100644 --- a/project_template/devscripts/requirements/requirements_tox.txt +++ b/project_template/devscripts/requirements/requirements_tox.txt @@ -1 +1 @@ -tox >= 1.8 +tox >= 2.0, <= 2.9.1 -- 2.39.2 From d4d8c0566f84a0b241412e0019a0d3c3ba02779b Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Apr 2018 01:26:51 +0300 Subject: [PATCH 05/16] Style(setup.py): Reindent parameters --- project_template/setup.py | 89 ++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/project_template/setup.py b/project_template/setup.py index d02a035..52cb27e 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -7,47 +7,48 @@ from setuptools import setup versionpath = join(abspath(dirname(__file__)), '{project}', '__version__.py') {project}_version = load_source('{project}_version', versionpath) -setup(name='{project}', - version={project}_version.__version__, - description='Broytman {project}', - long_description=open('README.rst', 'rU').read(), - long_description_content_type="text/x-rst", - author='Oleg Broytman', - author_email='phd@phdru.name', - url='http://phdru.name/Software/Python/{project}', - download_url='http://phdru.name/Software/Python/{project}', - project_urls={ - 'Homepage': 'http://phdru.name/Software/Python/{project}', - 'Documentation': - 'http://phdru.name/Software/Python/{project}/docs/', - 'Russian docs': - 'http://phdru.name/Software/Python/{project}/docs/ru/', - 'Download': 'http://phdru.name/Software/Python/{project}', - 'Git repo': 'http://git.phdru.name/{project}.git/', - 'Github repo': 'https://github.com/phdru/{project}', - 'Issue tracker': 'https://github.com/phdru/{project}/issues', - }, - license='GPL', - keywords=[''], - platforms='Any', - classifiers=[ - 'Development Status :: 1 - Planning', - 'Environment :: Console', - 'Environment :: Web Environment', - 'Intended Audience :: End Users/Desktop', - 'License :: OSI Approved :: GNU General Public License (GPL)', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - ], - packages=['{project}'], - package_data={'{project}': []}, - scripts=[], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*', - requires=[], - ) +setup( + name='{project}', + version={project}_version.__version__, + description='Broytman {project}', + long_description=open('README.rst', 'rU').read(), + long_description_content_type="text/x-rst", + author='Oleg Broytman', + author_email='phd@phdru.name', + url='http://phdru.name/Software/Python/{project}', + download_url='http://phdru.name/Software/Python/{project}', + project_urls={ + 'Homepage': 'http://phdru.name/Software/Python/{project}', + 'Documentation': + 'http://phdru.name/Software/Python/{project}/docs/', + 'Russian docs': + 'http://phdru.name/Software/Python/{project}/docs/ru/', + 'Download': 'http://phdru.name/Software/Python/{project}', + 'Git repo': 'http://git.phdru.name/{project}.git/', + 'Github repo': 'https://github.com/phdru/{project}', + 'Issue tracker': 'https://github.com/phdru/{project}/issues', + }, + license='GPL', + keywords=[''], + platforms='Any', + classifiers=[ + 'Development Status :: 1 - Planning', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Intended Audience :: End Users/Desktop', + 'License :: OSI Approved :: GNU General Public License (GPL)', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], + packages=['{project}'], + package_data={'{project}': []}, + scripts=[], + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*', + requires=[], +) -- 2.39.2 From 25038de79ea50c08585345522f860f13e9224857 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 25 May 2018 11:22:42 +0300 Subject: [PATCH 06/16] Upgrade: http://phdru.name -> https://phdru.name --- project_template/README.rst | 6 +++--- project_template/devscripts/README.html | 2 +- .../devscripts/requirements/requirements.txt | 2 +- project_template/docs/install.rst | 4 ++-- project_template/setup.cfg | 2 +- project_template/setup.py | 14 +++++++------- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/project_template/README.rst b/project_template/README.rst index d876efc..749389f 100644 --- a/project_template/README.rst +++ b/project_template/README.rst @@ -10,8 +10,8 @@ License: GPL. This is {project}. -| Home Page: http://phdru.name/Software/Python/{project}/ -| Documentation: http://phdru.name/Software/Python/{project}/docs/ -| Git repo: http://git.phdru.name/{project}.git/ +| Home Page: https://phdru.name/Software/Python/{project}/ +| Documentation: https://phdru.name/Software/Python/{project}/docs/ +| Git repo: https://git.phdru.name/{project}.git/ | GitHub repo: https://github.com/phdru/{project} | Issue tracker: https://github.com/phdru/{project}/issues diff --git a/project_template/devscripts/README.html b/project_template/devscripts/README.html index edb7443..3bbd989 100644 --- a/project_template/devscripts/README.html +++ b/project_template/devscripts/README.html @@ -1 +1 @@ -Broytman {project} +Broytman {project} diff --git a/project_template/devscripts/requirements/requirements.txt b/project_template/devscripts/requirements/requirements.txt index 788a287..ccdf6d1 100644 --- a/project_template/devscripts/requirements/requirements.txt +++ b/project_template/devscripts/requirements/requirements.txt @@ -1,5 +1,5 @@ --trusted-host phdru.name ---find-links=http://phdru.name/Software/Python/ +--find-links=https://phdru.name/Software/Python/ --install-option=-O2 m_lib.defenc >= 1.0 diff --git a/project_template/docs/install.rst b/project_template/docs/install.rst index 91b5c3e..cfaf935 100644 --- a/project_template/docs/install.rst +++ b/project_template/docs/install.rst @@ -6,14 +6,14 @@ System-wide :: - sudo pip install --find-links=http://phdru.name/Software/Python/ --no-index --install-option='-O2' {project} + sudo pip install --find-links=https://phdru.name/Software/Python/ --no-index --install-option='-O2' {project} User mode --------- :: - pip install --find-links=http://phdru.name/Software/Python/ --no-index --install-option='-O2' --user {project} + pip install --find-links=https://phdru.name/Software/Python/ --no-index --install-option='-O2' --user {project} Installation from sources ========================= diff --git a/project_template/setup.cfg b/project_template/setup.cfg index d84280f..ab2e677 100644 --- a/project_template/setup.cfg +++ b/project_template/setup.cfg @@ -2,7 +2,7 @@ universal = 1 [easy_install] -find_links = http://phdru.name/Software/Python/ +find_links = https://phdru.name/Software/Python/ optimize = 2 [egg_info] diff --git a/project_template/setup.py b/project_template/setup.py index 52cb27e..21eeadb 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -15,16 +15,16 @@ setup( long_description_content_type="text/x-rst", author='Oleg Broytman', author_email='phd@phdru.name', - url='http://phdru.name/Software/Python/{project}', - download_url='http://phdru.name/Software/Python/{project}', + url='https://phdru.name/Software/Python/{project}', + download_url='https://phdru.name/Software/Python/{project}', project_urls={ - 'Homepage': 'http://phdru.name/Software/Python/{project}', + 'Homepage': 'https://phdru.name/Software/Python/{project}', 'Documentation': - 'http://phdru.name/Software/Python/{project}/docs/', + 'https://phdru.name/Software/Python/{project}/docs/', 'Russian docs': - 'http://phdru.name/Software/Python/{project}/docs/ru/', - 'Download': 'http://phdru.name/Software/Python/{project}', - 'Git repo': 'http://git.phdru.name/{project}.git/', + 'https://phdru.name/Software/Python/{project}/docs/ru/', + 'Download': 'https://phdru.name/Software/Python/{project}', + 'Git repo': 'https://git.phdru.name/{project}.git/', 'Github repo': 'https://github.com/phdru/{project}', 'Issue tracker': 'https://github.com/phdru/{project}/issues', }, -- 2.39.2 From ec7ddd82b978788b2e620e7b44beec5a2a4c72ac Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 15 Jun 2018 19:34:56 +0300 Subject: [PATCH 07/16] Feat: Add script for moving projects --- move-project | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 move-project diff --git a/move-project b/move-project new file mode 100755 index 0000000..72f7475 --- /dev/null +++ b/move-project @@ -0,0 +1,27 @@ +#! /bin/sh + +if [ -z "$1" -o -n "$2" ]; then + echo "Usage: $0 project_name" >&2 + exit 1 +fi + +project_name="$1" +old_dir="$HOME/admin/prog/$1" +new_dir="$HOME/prog/Python/$1" + +fix_path() { + config_option="$1" + path="`git config --get $config_option`" + new_path="`echo \"$path\" | sed \"s@$old_dir@$new_dir@\"`" + git config "$config_option" "$new_path" +} + +mv "$old_dir" "$new_dir" && + +for project_dir in "$new_dir" "$HOME"/current/projects/"$project_name" \ + "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$project_name".git; do + cd "$project_dir" && + for remote in `git remote`; do + fix_path "remote.$remote.url" + done +done -- 2.39.2 From f59ff0d31d44c1bade3eaa8d02ecb36d65bc415a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 21 Aug 2018 21:36:33 +0300 Subject: [PATCH 08/16] Drop support for Python 3.3 --- project_template/.travis.yml | 4 +--- project_template/appveyor.yml | 10 +--------- .../devscripts/requirements/requirements.txt | 2 +- project_template/setup.py | 3 +-- project_template/tox.ini | 7 +------ 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/project_template/.travis.yml b/project_template/.travis.yml index 74a6ebc..1ac2757 100644 --- a/project_template/.travis.yml +++ b/project_template/.travis.yml @@ -20,8 +20,6 @@ matrix: include: - python: "2.7" env: TOXENV=py27 - - python: "3.3" - env: TOXENV=py33 - python: "3.4" env: TOXENV=py34 - python: "3.5" @@ -39,7 +37,7 @@ matrix: - env: TOXENV=pypy install: - - travis_retry pip install --upgrade pip setuptools "tox <= 2.9.1" ppu + - travis_retry pip install --upgrade pip setuptools tox ppu script: - tox diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index c0606b8..3cf8282 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -32,14 +32,6 @@ environment: PYTHON_VERSION: "2.7" PYTHON_ARCH: "64" PYTHON_HOME: "C:\\Python27-x64" - - TOXENV: "py33" - PYTHON_VERSION: "3.3" - PYTHON_ARCH: "32" - PYTHON_HOME: "C:\\Python33" - - TOXENV: "py33" - PYTHON_VERSION: "3.3" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python33-x64" - TOXENV: "py34" PYTHON_VERSION: "3.4" PYTHON_ARCH: "32" @@ -72,7 +64,7 @@ install: - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - "python -m pip install --upgrade pip setuptools" - - "pip install --upgrade \"tox <= 2.9.1\" ppu" + - "pip install --upgrade tox ppu" - "pip --version" # No build step - we don't have C extensions diff --git a/project_template/devscripts/requirements/requirements.txt b/project_template/devscripts/requirements/requirements.txt index ccdf6d1..06736f7 100644 --- a/project_template/devscripts/requirements/requirements.txt +++ b/project_template/devscripts/requirements/requirements.txt @@ -4,4 +4,4 @@ m_lib.defenc >= 1.0 m_lib >= 2.0; python_version >= '2.7' and python_version < '3.0' -m_lib >= 3.0; python_version >= '3.3' +m_lib >= 3.0; python_version >= '3.4' diff --git a/project_template/setup.py b/project_template/setup.py index 21eeadb..7e8df8d 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -41,7 +41,6 @@ setup( 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -49,6 +48,6 @@ setup( packages=['{project}'], package_data={'{project}': []}, scripts=[], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', requires=[], ) diff --git a/project_template/tox.ini b/project_template/tox.ini index 76dea95..2164f05 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -1,13 +1,12 @@ [tox] minversion = 2.0 toxworkdir={homedir}/.tox/{project} -envlist = {py27,py33,py34,py35,py36},{py27,py34}-flake8 +envlist = py27,py3{4,5,6},py{27,34}-flake8 # Base test environment settings [testenv] basepython = py27: {env:TOXPYTHON:python2.7} - py33: {env:TOXPYTHON:python3.3} py34: {env:TOXPYTHON:python3.4} py35: {env:TOXPYTHON:python3.5} py36: {env:TOXPYTHON:python3.6} @@ -32,10 +31,6 @@ commands = commands = {[general]commands} -[testenv:py33] -commands = - {[general]commands} - [testenv:py34] commands = {[general]commands} -- 2.39.2 From e862738056edec4afd8aced136dbc536ca5d81e6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 1 Feb 2019 23:22:17 +0300 Subject: [PATCH 09/16] Add release script --- project_template/devscripts/release | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 project_template/devscripts/release diff --git a/project_template/devscripts/release b/project_template/devscripts/release new file mode 100755 index 0000000..3fe6abe --- /dev/null +++ b/project_template/devscripts/release @@ -0,0 +1,16 @@ +#! /bin/sh + +cd "`dirname \"$0\"`"/.. && +umask 022 && +chmod -R a+rX . && +set-commit-date.py && + +python setup.py build_py && +python setup.py build --executable '/usr/bin/env python' && +python setup.py sdist && + +find build -name '*.py[co]' -delete && +python setup.py bdist_wheel --universal && + +twine upload dist/* && +exec rm -rf build dist *.egg-info -- 2.39.2 From 0782f8ed175be535db7c37d4221cf5b8b384f497 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 1 Feb 2019 23:22:32 +0300 Subject: [PATCH 10/16] Require pytest < 5.0 for Python 2.7 --- project_template/devscripts/requirements/requirements_tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_template/devscripts/requirements/requirements_tests.txt b/project_template/devscripts/requirements/requirements_tests.txt index 8e890d8..ae7bbd9 100644 --- a/project_template/devscripts/requirements/requirements_tests.txt +++ b/project_template/devscripts/requirements/requirements_tests.txt @@ -1,4 +1,4 @@ -r requirements.txt -pytest +pytest < 5.0 pytest-cov -- 2.39.2 From ae876aff04182070cab37ec32feda22af8603ee7 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 1 Feb 2019 23:24:36 +0300 Subject: [PATCH 11/16] Python 3.7 --- project_template/.travis.yml | 8 ++++++-- project_template/appveyor.yml | 8 ++++++++ project_template/setup.py | 1 + project_template/tox.ini | 9 +++++++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/project_template/.travis.yml b/project_template/.travis.yml index 1ac2757..d78fc85 100644 --- a/project_template/.travis.yml +++ b/project_template/.travis.yml @@ -26,10 +26,14 @@ matrix: env: TOXENV=py35 - python: "3.6" env: TOXENV=py36 + - python: "3.7" + dist: xenial + env: TOXENV=py37 - python: "2.7" env: TOXENV=py27-flake8 - - python: "3.4" - env: TOXENV=py34-flake8 + - python: "3.7" + dist: xenial + env: TOXENV=py37-flake8 - python: "pypy" env: TOXENV=pypy diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 3cf8282..1078998 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -56,6 +56,14 @@ environment: PYTHON_VERSION: "3.6" PYTHON_ARCH: "64" PYTHON_HOME: "C:\\Python36-x64" + - TOXENV: "py37" + PYTHON_VERSION: "3.7" + PYTHON_ARCH: "32" + PYTHON_HOME: "C:\\Python37" + - TOXENV: "py37" + PYTHON_VERSION: "3.7" + PYTHON_ARCH: "64" + PYTHON_HOME: "C:\\Python37-x64" install: # Ensure we use the right python version diff --git a/project_template/setup.py b/project_template/setup.py index 7e8df8d..2ca49ae 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -44,6 +44,7 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ], packages=['{project}'], package_data={'{project}': []}, diff --git a/project_template/tox.ini b/project_template/tox.ini index 2164f05..f3eceaa 100644 --- a/project_template/tox.ini +++ b/project_template/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 2.0 toxworkdir={homedir}/.tox/{project} -envlist = py27,py3{4,5,6},py{27,34}-flake8 +envlist = py27,py3{4,5,6,7},py{27,37}-flake8 # Base test environment settings [testenv] @@ -10,6 +10,7 @@ basepython = py34: {env:TOXPYTHON:python3.4} py35: {env:TOXPYTHON:python3.5} py36: {env:TOXPYTHON:python3.6} + py37: {env:TOXPYTHON:python3.7} pypy: {env:TOXPYTHON:pypy} commands = {envpython} --version @@ -43,6 +44,10 @@ commands = commands = {[general]commands} +[testenv:py37] +commands = + {[general]commands} + [testenv:py27-flake8] deps = flake8 @@ -50,7 +55,7 @@ commands = {[testenv]commands} flake8 -[testenv:py34-flake8] +[testenv:py37-flake8] deps = flake8 commands = -- 2.39.2 From f0d11b29c346d0c9eafffd31dd4e14f5bc1b726e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 1 Feb 2019 23:25:54 +0300 Subject: [PATCH 12/16] Require tox < 3.1 to avoid basepython conflicts --- project_template/appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 1078998..7c06e21 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -72,7 +72,7 @@ install: - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - "python -m pip install --upgrade pip setuptools" - - "pip install --upgrade tox ppu" + - "pip install --upgrade \"tox < 3.1\" ppu" - "pip --version" # No build step - we don't have C extensions -- 2.39.2 From f47f7206030e336d2b1362c7fb9090a41ca3d06c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 2 Feb 2019 23:36:59 +0300 Subject: [PATCH 13/16] Build(release): Skip exiting files at PyPI --- project_template/devscripts/release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_template/devscripts/release b/project_template/devscripts/release index 3fe6abe..e800c45 100755 --- a/project_template/devscripts/release +++ b/project_template/devscripts/release @@ -12,5 +12,5 @@ python setup.py sdist && find build -name '*.py[co]' -delete && python setup.py bdist_wheel --universal && -twine upload dist/* && +twine upload --skip-existing dist/* && exec rm -rf build dist *.egg-info -- 2.39.2 From 0152ab9722e3efc46defda62ded513d251dd94fe Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 3 Feb 2019 21:46:34 +0300 Subject: [PATCH 14/16] CI: Require pip < 19.1 for Python 2.7 and 3.4 --- project_template/.travis.yml | 2 +- project_template/appveyor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project_template/.travis.yml b/project_template/.travis.yml index d78fc85..e5fa711 100644 --- a/project_template/.travis.yml +++ b/project_template/.travis.yml @@ -41,7 +41,7 @@ matrix: - env: TOXENV=pypy install: - - travis_retry pip install --upgrade pip setuptools tox ppu + - travis_retry pip install --upgrade "pip < 19.1" setuptools tox ppu script: - tox diff --git a/project_template/appveyor.yml b/project_template/appveyor.yml index 7c06e21..54a1627 100644 --- a/project_template/appveyor.yml +++ b/project_template/appveyor.yml @@ -71,7 +71,7 @@ install: - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - "python -m pip install --upgrade pip setuptools" + - "python -m pip install --upgrade \"pip < 19.1\" setuptools" - "pip install --upgrade \"tox < 3.1\" ppu" - "pip --version" -- 2.39.2 From 30a18d3f2facb32032ab8036b212111f6f715131 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 7 Feb 2019 16:39:57 +0300 Subject: [PATCH 15/16] Build(setup.py): Use `importlib` instead of deprecated `imp` for Python 3.4+ --- project_template/setup.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/project_template/setup.py b/project_template/setup.py index 2ca49ae..8297efa 100755 --- a/project_template/setup.py +++ b/project_template/setup.py @@ -1,8 +1,24 @@ #!/usr/bin/env python -from imp import load_source from os.path import abspath, dirname, join from setuptools import setup +import sys + +if sys.version_info[:2] == (2, 7): + from imp import load_source + +elif sys.version_info >= (3, 4): + from importlib.machinery import SourceFileLoader + import types + + def load_source(fullname, path): + loader = SourceFileLoader(fullname, path) + loaded = types.ModuleType(loader.name) + loader.exec_module(loaded) + return loaded + +else: + raise ImportError("{project} requires Python 2.7 or 3.4+") versionpath = join(abspath(dirname(__file__)), '{project}', '__version__.py') {project}_version = load_source('{project}_version', versionpath) -- 2.39.2 From fcc5417d32bac949956ec3a12aa859a4d264e508 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 25 Feb 2019 21:19:00 +0300 Subject: [PATCH 16/16] CI(travis): Remove outdated sudo keyword --- project_template/.travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/project_template/.travis.yml b/project_template/.travis.yml index e5fa711..19b5d49 100644 --- a/project_template/.travis.yml +++ b/project_template/.travis.yml @@ -6,9 +6,6 @@ branches: only: - master -# Prefer docker containers -sudo: required - language: python python: -- 2.39.2