Skip to content

Commit 440708c

Browse files
committed
use versioneer
1 parent 19d6a51 commit 440708c

File tree

7 files changed

+2465
-5
lines changed

7 files changed

+2465
-5
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/pymor_dealii/version.py export-subst

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ graft src
33
include CMakeLists.txt
44
include README.md
55
include LICENSE
6+
include versioneer.py
7+
include src/pymor_dealii/version.py

setup.cfg

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[pycodestyle]
2+
max-line-length = 120
3+
max-doc-length = 100
4+
ignore = E221,E226,E241,E242, E731, E741, W0105, W503, N803, N806,\
5+
D100,D101,D102,D103,D105,D106,D107,\
6+
D400,D401,D414,\
7+
F403,F405,F722,\
8+
RST304,RST305
9+
# E221 multiple spaces before operator
10+
# E226 missing whitespace around arithmetic operator [ignored by default]
11+
# E241 multiple spaces after ':' [ignored by default]
12+
# E242 tab after `,' [ignored by default]
13+
# E731 do not assign a lambda expression, use a def
14+
# E741 do not use variables named 'l', 'O', or 'I'
15+
# F405, F403 star import usage from pymor.basic
16+
# F722 syntax error in forward annotation
17+
# W0105 String statement has no effect (we use triple qoted strings as documentation in some files)
18+
# W503 line break before binary operator
19+
# N803 argument name should be lowercase (we use single capital letters everywhere for vectorarrays)
20+
# N806 same for variables in function
21+
# D10? missing docstring in module, function, method, magic, __init__, public nested class
22+
# D40? first line ending with period, summary in imperative mood
23+
# D414 "section has no content" Happens since flake8 looks for sections by name, not markup
24+
# (i.e. finds "empty" parameters section when used as an argument)
25+
26+
[flake8]
27+
max-line-length = 120
28+
max-doc-length = 100
29+
ignore = E221,E226,E241,E242, E731, E741, W0105, W503, N803, N806,\
30+
D100,D101,D102,D103,D105,D106,D107,\
31+
D400,D401,D414,\
32+
F403,F405,F722,\
33+
RST304,RST305
34+
# The following exclude avoids wrong warnings for unused imports
35+
exclude = __init__.py
36+
37+
[check-manifest]
38+
ignore =
39+
.ci/*
40+
.ci
41+
*.yml
42+
*.yaml
43+
.mailmap
44+
45+
[versioneer]
46+
VCS = git
47+
style = pep440-pre
48+
versionfile_source = src/pymor_dealii/version.py
49+
# this is mandatory for the processed version.py to end up in .whl
50+
versionfile_build = pymor_dealii/version.py
51+
tag_prefix = ''
52+
53+
[tool:pytest]
54+
testpaths = src/test/
55+
python_files = src/test/*.py
56+
python_classes = Test
57+
pep8maxlinelength = 120
58+
pep8ignore = E221,E226,E241,E242
59+
addopts=-p no:warnings
60+
junit_family=xunit2
61+
62+
[metadata]
63+
# this is mandatory to lave license end up in .whl
64+
license_file = LICENSE
65+
66+
[coverage:run]
67+
relative_files = True
68+
source =
69+
src/pymor_dealii
70+
src/test
71+
omit =
72+
src/pymor_dealii/version.py

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import pathlib
5+
import versioneer
56

67
from setuptools import setup, Extension
78
from setuptools import find_packages
@@ -51,20 +52,20 @@ def build_cmake(self, ext):
5152
self.spawn(['cmake', '--build', '.'] + build_args)
5253
os.chdir(str(cwd))
5354

55+
cmdclass=versioneer.get_cmdclass()
56+
cmdclass['build_ext'] = build_ext
5457

55-
setup(
58+
setup(
59+
version=versioneer.get_version(),
5660
name='pymor_dealii',
5761
author='pyMOR developers',
5862
author_email='[email protected]',
5963
maintainer='Rene Fritze',
6064
maintainer_email='[email protected]',
61-
version='2019.2rc0',
6265
install_requires=[],
6366
package_dir={'': 'src'},
6467
packages=find_packages('src'),
6568
include_package_data=True,
6669
ext_modules=[CMakeExtension('pymor_dealii')],
67-
cmdclass={
68-
'build_ext': build_ext,
69-
}
70+
cmdclass=cmdclass,
7071
)

src/pymor_dealii/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
from .version import get_versions
3+
__version__ = get_versions()['version']
4+
del get_versions

0 commit comments

Comments
 (0)