Skip to content

Commit c376f1e

Browse files
committed
Make Python 3.6+ only, update packaging boilerplate
1 parent 00e4e2c commit c376f1e

File tree

11 files changed

+57
-74
lines changed

11 files changed

+57
-74
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ Lib/booleanOperations.egg-info
1212

1313
.tox/
1414
.cache/
15+
16+
_version.py

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ env:
77

88
matrix:
99
include:
10-
- python: 2.7
1110
- python: 3.6
1211
- python: 3.7
1312
# required to run python3.7 on Travis CI

Lib/booleanOperations/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
from __future__ import print_function, division, absolute_import
22
from .booleanOperationManager import BooleanOperationManager
33
from .exceptions import BooleanOperationsError
4-
from .version import __version__
4+
5+
try:
6+
from ._version import version as __version__
7+
except ImportError:
8+
__version__ = "0.0.0+unknown"
59

610
# export BooleanOperationManager static methods
711
union = BooleanOperationManager.union

Lib/booleanOperations/version.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,4 @@ List the **anchors** of the glyph.
195195
:target: https://travis-ci.org/typemytype/booleanOperations
196196
.. |PyPI| image:: https://img.shields.io/pypi/v/booleanOperations.svg
197197
:target: https://pypi.org/project/booleanOperations/
198-
.. |Python Versions| image:: https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5%2C%203.6-blue.svg
198+
.. |Python Versions| image:: https://img.shields.io/badge/python-3.6,%203.7-blue.svg

appveyor.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
environment:
22
matrix:
3-
- PYTHON: "C:\\Python27"
4-
PYTHON_VERSION: "2.7.x"
5-
PYTHON_ARCH: "32"
6-
73
- PYTHON: "C:\\Python36-x64"
84
PYTHON_VERSION: "3.6.x"
95
PYTHON_ARCH: "64"

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm"]

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
pyclipper==1.0.5
2-
# fontTools.ufoLib is not imported directly by booleanOperations, but
3-
# the test suite needs defcon, which in turns requires fonttools installed
4-
# with [ufo] support
5-
fonttools[ufo]==3.32.0
1+
# fontTools.ufoLib is not imported directly by booleanOperations, but
2+
# the test suite needs defcon, which in turns requires fonttools installed
3+
# with [ufo] support
4+
fonttools[ufo]==4.0.2
5+
pyclipper==1.1.0.post1

setup.cfg

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,49 @@
1-
[wheel]
2-
universal = 1
1+
[metadata]
2+
name = booleanOperations
3+
description = Boolean operations on paths.
4+
long_description = file: README.rst
5+
url = https://github.com/typemytype/booleanOperations
6+
author = Frederik Berlaen
7+
author_email = [email protected]
8+
license = MIT
9+
license_file = LICENSE
10+
classifiers =
11+
Development Status :: 4 - Beta
12+
Intended Audience :: Developers
13+
License :: OSI Approved :: MIT License
14+
Operating System :: OS Independent
15+
Programming Language :: Python
16+
Programming Language :: Python :: 3
17+
Programming Language :: Python :: 3.6
18+
Programming Language :: Python :: 3.7
19+
Topic :: Multimedia :: Graphics :: Editors :: Vector-Based
20+
Topic :: Software Development :: Libraries :: Python Modules
21+
22+
[options]
23+
package_dir = =Lib
24+
packages = find:
25+
python_requires = >=3.6
26+
setup_requires =
27+
setuptools_scm
28+
wheel
29+
install_requires =
30+
pyclipper >= 1.1.0.post1
31+
fonttools >= 4.0.2
32+
33+
[options.packages.find]
34+
where = Lib
35+
36+
[bdist_wheel]
37+
universal = 0
338

439
[sdist]
540
formats = zip
641

7-
[aliases]
8-
test = pytest
9-
1042
[tool:pytest]
11-
minversion = 3.0.2
12-
testpaths =
13-
Lib/booleanOperations
14-
tests
1543
addopts =
16-
# run py.test in verbose mode
17-
-v
1844
# show extra test summary info
1945
-r a
2046
# run doctests in all .py modules
2147
--doctest-modules
48+
filterwarnings =
49+
ignore::DeprecationWarning:fontTools.misc.py23

setup.py

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
from setuptools import setup, find_packages
2-
import sys
1+
from setuptools import setup
32

4-
needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
5-
pytest_runner = ['pytest_runner'] if needs_pytest else []
6-
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
7-
wheel = ['wheel'] if needs_wheel else []
8-
9-
with open('README.rst', 'r') as f:
10-
long_description = f.read()
11-
12-
setup_params = dict(
13-
name="booleanOperations",
14-
use_scm_version=True,
15-
description="Boolean operations on paths.",
16-
long_description=long_description,
17-
author="Frederik Berlaen",
18-
author_email="[email protected]",
19-
url="https://github.com/typemytype/booleanOperations",
20-
license="MIT",
21-
package_dir={"": "Lib"},
22-
packages=find_packages("Lib"),
23-
setup_requires=[
24-
"setuptools_scm>=1.11.1,!=1.13.1,!=1.14.0",
25-
] + pytest_runner + wheel,
26-
tests_require=[
27-
'pytest>=3.0.2',
28-
],
29-
install_requires=[
30-
"pyclipper>=1.0.5",
31-
"fonttools>=3.32.0",
32-
],
33-
classifiers=[
34-
'Development Status :: 4 - Beta',
35-
'Intended Audience :: Developers',
36-
'License :: OSI Approved :: MIT License',
37-
'Operating System :: OS Independent',
38-
'Programming Language :: Python',
39-
'Programming Language :: Python :: 2',
40-
'Programming Language :: Python :: 3',
41-
'Topic :: Multimedia :: Graphics :: Editors :: Vector-Based',
42-
'Topic :: Software Development :: Libraries :: Python Modules',
43-
],
44-
)
45-
46-
if __name__ == "__main__":
47-
setup(**setup_params)
3+
setup(use_scm_version={"write_to": "Lib/booleanOperations/_version.py"})

0 commit comments

Comments
 (0)