Skip to content

Commit 922754f

Browse files
committed
Backport from newer python
* `use_develop = false`, use direct setup.py for tests * cleanup SDIST package * move travis Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent e8909b0 commit 922754f

13 files changed

+258
-313
lines changed

.editorconfig

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ root = true
33
[*]
44
charset = utf-8
55
end_of_line = lf
6-
indent_size = 4
6+
indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11-
[*.{py,ini}]
11+
[*.{py,pyx,pxd,pyi}]
12+
indent_size = 4
1213
max_line_length = 120
1314

14-
[*.{yml,rst}]
15-
indent_size = 2
15+
[*.rst]
16+
max_line_length = 150
1617

1718
[Makefile]
1819
indent_style = tab

.travis.yml

+97-97
Original file line numberDiff line numberDiff line change
@@ -2,118 +2,118 @@ sudo: false
22
language: python
33
os: linux
44
install:
5-
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
6-
- pip install --upgrade pytest pytest-sugar
7-
- &install_deps pip install -r CI_REQUIREMENTS.txt
8-
- pip install --upgrade pytest-cov coveralls
5+
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
6+
- pip install --upgrade pytest pytest-sugar
7+
- &install_deps pip install -r CI_REQUIREMENTS.txt
8+
- pip install --upgrade pytest-cov coveralls
99

1010
_python:
11-
- &python27
12-
name: "Python 2.7"
13-
python: "2.7"
14-
- &pypy
15-
name: "PyPy"
16-
python: "pypy"
17-
- &python37
18-
name: "Python 3.7"
19-
python: "3.7"
20-
dist: xenial
21-
sudo: true
11+
- &python27
12+
name: "Python 2.7"
13+
python: "2.7"
14+
- &pypy
15+
name: "PyPy"
16+
python: "pypy"
17+
- &python37
18+
name: "Python 3.7"
19+
python: "3.7"
20+
dist: xenial
21+
sudo: true
2222

2323
_helpers:
24-
- &build_package python setup.py bdist_wheel
24+
- &build_package python setup.py bdist_wheel
2525

26-
- &static_analysis
27-
stage: Static analysis
28-
<<: *python27
29-
after_success: skip
26+
- &static_analysis
27+
stage: Static analysis
28+
<<: *python27
29+
after_success: skip
3030

31-
- &code_style_check
32-
stage: Code style check
33-
<<: *python27
34-
after_success: skip
31+
- &code_style_check
32+
stage: Code style check
33+
<<: *python27
34+
after_success: skip
3535

3636
script:
37-
- pip install -e .
38-
- py.test -vv --cov-config .coveragerc --cov-report= --cov=threaded test
39-
- coverage report -m --fail-under 87
37+
- python setup.py develop -v
38+
- py.test -vv --cov-config .coveragerc --cov-report= --cov=threaded test
39+
- coverage report -m --fail-under 87
4040
after_success:
41-
- coveralls
41+
- coveralls
4242

4343
jobs:
4444
include:
45-
- <<: *static_analysis
46-
name: "PyLint"
47-
install:
48-
- *upgrade_python_toolset
49-
- *install_deps
50-
- pip install --upgrade "pylint < 2.0"
51-
script:
52-
- pylint threaded
53-
- <<: *static_analysis
54-
name: "Bandit"
55-
install:
56-
- *upgrade_python_toolset
57-
- pip install --upgrade bandit
58-
script:
59-
- bandit -r threaded
60-
- <<: *static_analysis
61-
<<: *python37
62-
name: "MyPy"
63-
install:
64-
- *upgrade_python_toolset
65-
- *install_deps
66-
- pip install --upgrade "mypy >= 0.670"
67-
script:
68-
- mypy --strict threaded
69-
- <<: *static_analysis
70-
name: "PEP8"
71-
install:
72-
- *upgrade_python_toolset
73-
- pip install --upgrade flake8
74-
script:
75-
- flake8
45+
- <<: *static_analysis
46+
name: "PyLint"
47+
install:
48+
- *upgrade_python_toolset
49+
- *install_deps
50+
- pip install --upgrade "pylint < 2.0"
51+
script:
52+
- pylint threaded
53+
- <<: *static_analysis
54+
name: "Bandit"
55+
install:
56+
- *upgrade_python_toolset
57+
- pip install --upgrade bandit
58+
script:
59+
- bandit -r threaded
60+
- <<: *static_analysis
61+
<<: *python37
62+
name: "MyPy"
63+
install:
64+
- *upgrade_python_toolset
65+
- *install_deps
66+
- pip install --upgrade "mypy >= 0.670"
67+
script:
68+
- mypy --strict threaded
69+
- <<: *static_analysis
70+
name: "PEP8"
71+
install:
72+
- *upgrade_python_toolset
73+
- pip install --upgrade flake8
74+
script:
75+
- flake8
7676

77-
# - <<: *code_style_check
78-
# name: "PEP257"
79-
# install:
80-
# - *upgrade_python_toolset
81-
# - pip install --upgrade pydocstyle
82-
# script:
83-
# - pydocstyle threaded
77+
# - <<: *code_style_check
78+
# name: "PEP257"
79+
# install:
80+
# - *upgrade_python_toolset
81+
# - pip install --upgrade pydocstyle
82+
# script:
83+
# - pydocstyle threaded
8484

85-
- stage: test
86-
<<: *python27
87-
- stage: test
88-
<<: *pypy
89-
allow_failure: true
85+
- stage: test
86+
<<: *python27
87+
- stage: test
88+
<<: *pypy
89+
allow_failure: true
9090

91-
- stage: deploy
92-
# This prevents job from appearing in test plan unless commit is tagged:
93-
if: tag IS present
94-
<<: *pypy
95-
name: Build universal bdist_wheel. Deploy bdist and sdist.
96-
services: []
97-
install:
98-
- *upgrade_python_toolset
99-
- pip install -r build_requirements.txt
100-
script:
101-
- *build_package
102-
before_deploy: []
103-
deploy:
104-
- provider: pypi
105-
# `skip_cleanup: true` is required to preserve binary wheels, built
106-
# inside of manylinux1 docker container during `script` step above.
107-
skip_cleanup: true
108-
user: penguinolog
109-
password:
110-
secure: "h1gXulNJxdjdUtPXDwUf/2MltjjiTy/cSsv+67Bxr9PAXSo9s0ynnhijKavE0QlKPr0NDJcEcl79dEN3gx1rkbAFZ+YRJfx0KHy26ImNAIx+npOFjGko87KhMNkrE3QBn9carWNnjYA4rCuUqbv/Znk9xixleE/sHJbKnkkTrerSI2jkznMa6h0FNVCEPzFesHmll7rBy4CjFkRcWNX8nfKNIV9rHFI7mXm8+jzl0msOnkEcKRqAk+MUwVjcD9XtpF42uA0nQTtqjWFdwSUxxBJKMyrkkI0o8Uk06EewkgJGwjGpvn+EUm1hBpjGrXUQQJyr20SZdC0CqaqXD/axISAtQPzP5I4Ey3VkLDV4mZuQjeNlbRbTH0Q7af+CpnOpFtYobIs1/HjB5wztazegT8uk4ZU/GheYqknXmtg9Ga8NV47sIpLC/hTLXWP+O/k0JKRYP9CgjTml2nLykNjZy4KRnlCUerYH8d4bNz687ElXU2bLtlBxyigUc9oo31DvNG+vB2axOp8wGiRTEpfBVPEF6EYUj+qSbX4ep4o/mWp+ax5YlLVYVoXkXpNecIggICAChIkqEl9MtGzTu31s3sBKpk9WuqoyHG80TDo2Tet6zWYx3itUx9M0SLkrML9Hs5WKsXDZE6jZrVHtx8lWuuZZl5JQkXYtd358lwJmEBM="
111-
on:
112-
tags: true
113-
distributions: sdist
114-
skip_upload_docs: true
115-
skip_existing: true
91+
- stage: deploy
92+
# This prevents job from appearing in test plan unless commit is tagged:
93+
if: tag IS present
94+
<<: *pypy
95+
name: Build universal bdist_wheel. Deploy bdist and sdist.
96+
services: []
97+
install:
98+
- *upgrade_python_toolset
99+
- pip install -r build_requirements.txt
100+
script:
101+
- *build_package
102+
before_deploy: []
103+
deploy:
104+
- provider: pypi
105+
# `skip_cleanup: true` is required to preserve binary wheels, built
106+
# inside of manylinux1 docker container during `script` step above.
107+
skip_cleanup: true
108+
user: penguinolog
109+
password:
110+
secure: "h1gXulNJxdjdUtPXDwUf/2MltjjiTy/cSsv+67Bxr9PAXSo9s0ynnhijKavE0QlKPr0NDJcEcl79dEN3gx1rkbAFZ+YRJfx0KHy26ImNAIx+npOFjGko87KhMNkrE3QBn9carWNnjYA4rCuUqbv/Znk9xixleE/sHJbKnkkTrerSI2jkznMa6h0FNVCEPzFesHmll7rBy4CjFkRcWNX8nfKNIV9rHFI7mXm8+jzl0msOnkEcKRqAk+MUwVjcD9XtpF42uA0nQTtqjWFdwSUxxBJKMyrkkI0o8Uk06EewkgJGwjGpvn+EUm1hBpjGrXUQQJyr20SZdC0CqaqXD/axISAtQPzP5I4Ey3VkLDV4mZuQjeNlbRbTH0Q7af+CpnOpFtYobIs1/HjB5wztazegT8uk4ZU/GheYqknXmtg9Ga8NV47sIpLC/hTLXWP+O/k0JKRYP9CgjTml2nLykNjZy4KRnlCUerYH8d4bNz687ElXU2bLtlBxyigUc9oo31DvNG+vB2axOp8wGiRTEpfBVPEF6EYUj+qSbX4ep4o/mWp+ax5YlLVYVoXkXpNecIggICAChIkqEl9MtGzTu31s3sBKpk9WuqoyHG80TDo2Tet6zWYx3itUx9M0SLkrML9Hs5WKsXDZE6jZrVHtx8lWuuZZl5JQkXYtd358lwJmEBM="
111+
on:
112+
tags: true
113+
distributions: sdist
114+
skip_upload_docs: true
115+
skip_existing: true
116116

117117
cache: pip
118118
before_cache:
119-
- rm -f $HOME/.cache/pip/log/debug.log
119+
- rm -f $HOME/.cache/pip/log/debug.log

CHANGELOG.rst

-72
This file was deleted.

MANIFEST.in

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
include *.rst LICENSE requirements.txt
1+
include *.rst LICENSE requirements.txt pyproject.toml
22
global-exclude *.c
33
exclude Makefile
44
prune tools
5-
exclude .travis.yml appveyor.yml
6-
exclude tox.ini pytest.ini .coveragerc
5+
exclude .travis.yml appveyor.yml azure-pipelines.yml .pyup.yml
6+
exclude tox.ini pytest.ini .coveragerc .pylintrc
7+
exclude .gitignore .dockerignore
78
prune test
89
prune .github
9-
exclude CODEOWNERS CODE_OF_CONDUCT.md
10+
prune .azure_pipelines
11+
prune docs
12+
exclude CODEOWNERS CODE_OF_CONDUCT.md _config.yml

README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
threaded
22
========
33

4-
.. image:: https://travis-ci.org/python-useful-helpers/threaded.svg?branch=master
5-
:target: https://travis-ci.org/python-useful-helpers/threaded
4+
.. image:: https://travis-ci.com/python-useful-helpers/threaded.svg?branch=master
5+
:target: https://travis-ci.com/python-useful-helpers/threaded
66
.. image:: https://coveralls.io/repos/github/python-useful-helpers/threaded/badge.svg?branch=master
77
:target: https://coveralls.io/github/python-useful-helpers/threaded?branch=master
88
.. image:: https://readthedocs.org/projects/threaded/badge/?version=latest
@@ -139,10 +139,10 @@ CI systems
139139
==========
140140
For code checking several CI systems is used in parallel:
141141

142-
1. `Travis CI: <https://travis-ci.org/python-useful-helpers/threaded>`_ is used for checking: PEP8, pylint, bandit, installation possibility and unit tests. Also it's publishes coverage on coveralls.
142+
1. `Travis CI: <https://travis-ci.com/python-useful-helpers/threaded>`_ is used for checking: PEP8, pylint, bandit, installation possibility and unit tests. Also it's publishes coverage on coveralls.
143143

144144
2. `coveralls: <https://coveralls.io/github/python-useful-helpers/threaded>`_ is used for coverage display.
145145

146146
CD system
147147
=========
148-
`Travis CI: <https://travis-ci.org/python-useful-helpers/threaded>`_ is used for package delivery on PyPI.
148+
`Travis CI: <https://travis-ci.com/python-useful-helpers/threaded>`_ is used for package delivery on PyPI.

pyproject.toml

+19-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
# Minimum requirements for the build system to execute.
33
# PEP 508 specifications for PEP 518.
44
requires = [
5-
"setuptools >= 21.0.0,!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0", # PSF/ZPL
6-
"wheel",
5+
"setuptools >= 21.0.0,!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0", # PSF/ZPL
6+
"wheel",
7+
"setuptools_scm",
78
]
9+
build-backend="setuptools.build_meta"
10+
11+
[tool.black]
12+
line-length = 120
13+
safe = true
14+
target-version = ["py27"]
15+
16+
[tool.isort]
17+
line_length = 120
18+
multi_line_output = 3
19+
force_single_line = true
20+
21+
import_heading_stdlib = "Standard Library"
22+
import_heading_thirdparty = "External Dependencies"
23+
import_heading_firstparty = "Threaded Implementation"
24+
import_heading_localfolder = "Local Implementation"

0 commit comments

Comments
 (0)