boilerplates 1.2.0.dev0__tar.gz → 1.2.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {boilerplates-1.2.0.dev0/boilerplates.egg-info → boilerplates-1.2.0.dev2}/PKG-INFO +9 -9
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/setup.py +22 -1
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2/boilerplates.egg-info}/PKG-INFO +9 -9
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates.egg-info/requires.txt +2 -2
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_setup.txt +1 -1
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_setup.py +13 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/LICENSE +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/MANIFEST.in +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/NOTICE +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/README.rst +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/__init__.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/__init__.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/git_query.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/parser.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/patterns.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/py.typed +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/py_query.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/query.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/version.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/cli.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/config.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/git_repo_tests.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/logging.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/packaging_tests.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/py.typed +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/sentry.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates.egg-info/SOURCES.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates.egg-info/dependency_links.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates.egg-info/top_level.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/pyproject.toml +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_cli.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_config.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_git_repo_tests.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_logging.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_packaging_tests.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_sentry.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/requirements_test.txt +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/setup.cfg +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/setup.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/__init__.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_cli.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_config.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_git_repo.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_logging.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_packaging.py +0 -0
- {boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/test/test_sentry.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boilerplates
|
|
3
|
-
Version: 1.2.0.
|
|
3
|
+
Version: 1.2.0.dev2
|
|
4
4
|
Summary: Various boilerplates used in almost all of my Python packages.
|
|
5
5
|
Home-page: https://github.com/mbdevpl/python-boilerplates
|
|
6
6
|
Download-URL:
|
|
@@ -8,7 +8,7 @@ Author: Mateusz Bysiek, Stian Hanssen
|
|
|
8
8
|
Author-email: mateusz.bysiek@gmail.com
|
|
9
9
|
Maintainer: Mateusz Bysiek
|
|
10
10
|
Maintainer-email: mateusz.bysiek@gmail.com
|
|
11
|
-
License: Apache-2.0
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
12
|
Keywords: git,logging,packaging,releasing
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -36,13 +36,13 @@ Provides-Extra: setup
|
|
|
36
36
|
Requires-Dist: build~=1.2; extra == "setup"
|
|
37
37
|
Requires-Dist: docutils~=0.20; extra == "setup"
|
|
38
38
|
Requires-Dist: Pygments~=2.14; extra == "setup"
|
|
39
|
-
Requires-Dist: setuptools>=
|
|
39
|
+
Requires-Dist: setuptools>=77.0.3; extra == "setup"
|
|
40
40
|
Requires-Dist: version-query~=1.6; extra == "setup"
|
|
41
41
|
Provides-Extra: packaging-tests
|
|
42
42
|
Requires-Dist: build~=1.2; extra == "packaging-tests"
|
|
43
43
|
Requires-Dist: docutils~=0.20; extra == "packaging-tests"
|
|
44
44
|
Requires-Dist: Pygments~=2.14; extra == "packaging-tests"
|
|
45
|
-
Requires-Dist: setuptools>=
|
|
45
|
+
Requires-Dist: setuptools>=77.0.3; extra == "packaging-tests"
|
|
46
46
|
Requires-Dist: version-query~=1.6; extra == "packaging-tests"
|
|
47
47
|
Requires-Dist: pip>=24.0; extra == "packaging-tests"
|
|
48
48
|
Requires-Dist: wheel>=0.43; extra == "packaging-tests"
|
|
@@ -62,8 +62,8 @@ Dynamic: description
|
|
|
62
62
|
Dynamic: description-content-type
|
|
63
63
|
Dynamic: home-page
|
|
64
64
|
Dynamic: keywords
|
|
65
|
-
Dynamic: license
|
|
66
65
|
Dynamic: license-file
|
|
66
|
+
Dynamic: license-expression
|
|
67
67
|
Dynamic: maintainer
|
|
68
68
|
Dynamic: maintainer-email
|
|
69
69
|
Dynamic: provides-extra
|
|
@@ -99,7 +99,7 @@ Various boilerplates used in almost all of my Python packages.
|
|
|
99
99
|
:alt: grade from Codacy
|
|
100
100
|
|
|
101
101
|
.. image:: https://img.shields.io/github/license/mbdevpl/python-boilerplates.svg
|
|
102
|
-
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
102
|
+
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/NOTICE
|
|
103
103
|
:alt: license
|
|
104
104
|
|
|
105
105
|
This package includes boilerplates for various common tasks in Python packages, such as building
|
|
@@ -114,9 +114,9 @@ Requirements
|
|
|
114
114
|
|
|
115
115
|
Python version 3.9 or later.
|
|
116
116
|
|
|
117
|
-
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
117
|
+
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/requirements.txt>`_.
|
|
118
118
|
|
|
119
|
-
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
119
|
+
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/requirements_test.txt>`_.
|
|
120
120
|
|
|
121
121
|
Tested on Linux, macOS and Windows.
|
|
122
122
|
|
|
@@ -399,7 +399,7 @@ Your example ``cli.py`` file which defines your command-line interface may look
|
|
|
399
399
|
verbosity = boilerplates.cli.get_verbosity_level(parsed_args)
|
|
400
400
|
...
|
|
401
401
|
|
|
402
|
-
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
402
|
+
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/examples.ipynb>`_ notebook.
|
|
403
403
|
Please see the ``boilerplates.cli`` module for details of the available features.
|
|
404
404
|
|
|
405
405
|
And then, an example ``__main__.py`` file may look like:
|
|
@@ -20,6 +20,9 @@ DEFAULT_URL = 'https://github.com/mbdevpl'
|
|
|
20
20
|
DEFAULT_AUTHOR = 'Mateusz Bysiek'
|
|
21
21
|
DEFAULT_AUTHOR_EMAIL = 'mateusz.bysiek@gmail.com'
|
|
22
22
|
DEFAULT_LICENSE_STR = 'Apache-2.0'
|
|
23
|
+
DEFAULT_LICENSE_FILE_PATTENS = [
|
|
24
|
+
'CONTRIBUTORS', 'CONTRIBUTORS.*', 'LICENSE', 'LICENSE.*', 'NOTICE', 'NOTICE.*'
|
|
25
|
+
]
|
|
23
26
|
|
|
24
27
|
TEST_PACKAGES = [
|
|
25
28
|
'test',
|
|
@@ -262,6 +265,8 @@ class Package:
|
|
|
262
265
|
maintainer: str
|
|
263
266
|
maintainer_email: str
|
|
264
267
|
license_str: str = DEFAULT_LICENSE_STR
|
|
268
|
+
license_file_patterns: t.Sequence[str] = DEFAULT_LICENSE_FILE_PATTENS
|
|
269
|
+
_existing_license_file_patterns: t.Optional[t.Sequence[str]] = None
|
|
265
270
|
|
|
266
271
|
classifiers: t.List[str] = []
|
|
267
272
|
"""List of trove classifiers for the package.
|
|
@@ -345,6 +350,21 @@ class Package:
|
|
|
345
350
|
cls.install_requires = parse_requirements()
|
|
346
351
|
if cls.python_requires is None:
|
|
347
352
|
cls.python_requires = find_required_python_version(cls.classifiers)
|
|
353
|
+
cls._prepare_existing_license_file_patterns()
|
|
354
|
+
|
|
355
|
+
@classmethod
|
|
356
|
+
def _prepare_existing_license_file_patterns(cls):
|
|
357
|
+
if cls._existing_license_file_patterns is not None:
|
|
358
|
+
return
|
|
359
|
+
cls._existing_license_file_patterns = []
|
|
360
|
+
for pattern in cls.license_file_patterns:
|
|
361
|
+
results = list(pathlib.Path().resolve().glob(pattern))
|
|
362
|
+
_LOG.debug(
|
|
363
|
+
'found %i files matching pattern "%s" in current working directory',
|
|
364
|
+
len(results), pattern)
|
|
365
|
+
if len(results) == 0:
|
|
366
|
+
continue
|
|
367
|
+
cls._existing_license_file_patterns.append(pattern)
|
|
348
368
|
|
|
349
369
|
@classmethod
|
|
350
370
|
def setup(cls) -> None:
|
|
@@ -358,7 +378,8 @@ class Package:
|
|
|
358
378
|
author=cls.author, author_email=cls.author_email,
|
|
359
379
|
maintainer=cls.maintainer,
|
|
360
380
|
maintainer_email=cls.maintainer_email,
|
|
361
|
-
|
|
381
|
+
license_expression=cls.license_str, license_files=cls._existing_license_file_patterns,
|
|
382
|
+
classifiers=cls.classifiers, keywords=cls.keywords,
|
|
362
383
|
packages=cls.packages, package_dir={'': cls.root_directory},
|
|
363
384
|
include_package_data=True,
|
|
364
385
|
package_data=cls.package_data, exclude_package_data=cls.exclude_package_data,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: boilerplates
|
|
3
|
-
Version: 1.2.0.
|
|
3
|
+
Version: 1.2.0.dev2
|
|
4
4
|
Summary: Various boilerplates used in almost all of my Python packages.
|
|
5
5
|
Home-page: https://github.com/mbdevpl/python-boilerplates
|
|
6
6
|
Download-URL:
|
|
@@ -8,7 +8,7 @@ Author: Mateusz Bysiek, Stian Hanssen
|
|
|
8
8
|
Author-email: mateusz.bysiek@gmail.com
|
|
9
9
|
Maintainer: Mateusz Bysiek
|
|
10
10
|
Maintainer-email: mateusz.bysiek@gmail.com
|
|
11
|
-
License: Apache-2.0
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
12
|
Keywords: git,logging,packaging,releasing
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -36,13 +36,13 @@ Provides-Extra: setup
|
|
|
36
36
|
Requires-Dist: build~=1.2; extra == "setup"
|
|
37
37
|
Requires-Dist: docutils~=0.20; extra == "setup"
|
|
38
38
|
Requires-Dist: Pygments~=2.14; extra == "setup"
|
|
39
|
-
Requires-Dist: setuptools>=
|
|
39
|
+
Requires-Dist: setuptools>=77.0.3; extra == "setup"
|
|
40
40
|
Requires-Dist: version-query~=1.6; extra == "setup"
|
|
41
41
|
Provides-Extra: packaging-tests
|
|
42
42
|
Requires-Dist: build~=1.2; extra == "packaging-tests"
|
|
43
43
|
Requires-Dist: docutils~=0.20; extra == "packaging-tests"
|
|
44
44
|
Requires-Dist: Pygments~=2.14; extra == "packaging-tests"
|
|
45
|
-
Requires-Dist: setuptools>=
|
|
45
|
+
Requires-Dist: setuptools>=77.0.3; extra == "packaging-tests"
|
|
46
46
|
Requires-Dist: version-query~=1.6; extra == "packaging-tests"
|
|
47
47
|
Requires-Dist: pip>=24.0; extra == "packaging-tests"
|
|
48
48
|
Requires-Dist: wheel>=0.43; extra == "packaging-tests"
|
|
@@ -62,8 +62,8 @@ Dynamic: description
|
|
|
62
62
|
Dynamic: description-content-type
|
|
63
63
|
Dynamic: home-page
|
|
64
64
|
Dynamic: keywords
|
|
65
|
-
Dynamic: license
|
|
66
65
|
Dynamic: license-file
|
|
66
|
+
Dynamic: license-expression
|
|
67
67
|
Dynamic: maintainer
|
|
68
68
|
Dynamic: maintainer-email
|
|
69
69
|
Dynamic: provides-extra
|
|
@@ -99,7 +99,7 @@ Various boilerplates used in almost all of my Python packages.
|
|
|
99
99
|
:alt: grade from Codacy
|
|
100
100
|
|
|
101
101
|
.. image:: https://img.shields.io/github/license/mbdevpl/python-boilerplates.svg
|
|
102
|
-
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
102
|
+
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/NOTICE
|
|
103
103
|
:alt: license
|
|
104
104
|
|
|
105
105
|
This package includes boilerplates for various common tasks in Python packages, such as building
|
|
@@ -114,9 +114,9 @@ Requirements
|
|
|
114
114
|
|
|
115
115
|
Python version 3.9 or later.
|
|
116
116
|
|
|
117
|
-
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
117
|
+
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/requirements.txt>`_.
|
|
118
118
|
|
|
119
|
-
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
119
|
+
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/requirements_test.txt>`_.
|
|
120
120
|
|
|
121
121
|
Tested on Linux, macOS and Windows.
|
|
122
122
|
|
|
@@ -399,7 +399,7 @@ Your example ``cli.py`` file which defines your command-line interface may look
|
|
|
399
399
|
verbosity = boilerplates.cli.get_verbosity_level(parsed_args)
|
|
400
400
|
...
|
|
401
401
|
|
|
402
|
-
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.
|
|
402
|
+
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev2/examples.ipynb>`_ notebook.
|
|
403
403
|
Please see the ``boilerplates.cli`` module for details of the available features.
|
|
404
404
|
|
|
405
405
|
And then, an example ``__main__.py`` file may look like:
|
|
@@ -14,7 +14,7 @@ colorlog~=6.7
|
|
|
14
14
|
build~=1.2
|
|
15
15
|
docutils~=0.20
|
|
16
16
|
Pygments~=2.14
|
|
17
|
-
setuptools>=
|
|
17
|
+
setuptools>=77.0.3
|
|
18
18
|
version-query~=1.6
|
|
19
19
|
pip>=24.0
|
|
20
20
|
wheel>=0.43
|
|
@@ -26,5 +26,5 @@ sentry-sdk[pure_eval]~=2.5
|
|
|
26
26
|
build~=1.2
|
|
27
27
|
docutils~=0.20
|
|
28
28
|
Pygments~=2.14
|
|
29
|
-
setuptools>=
|
|
29
|
+
setuptools>=77.0.3
|
|
30
30
|
version-query~=1.6
|
|
@@ -231,3 +231,16 @@ class PackageTests(unittest.TestCase):
|
|
|
231
231
|
del Package.version
|
|
232
232
|
with self.assertRaises(FileNotFoundError):
|
|
233
233
|
Package.prepare()
|
|
234
|
+
|
|
235
|
+
def test_prepare_license_files(self):
|
|
236
|
+
# pylint: disable = protected-access
|
|
237
|
+
|
|
238
|
+
class Package(boilerplates.setup.Package):
|
|
239
|
+
name = 'package name'
|
|
240
|
+
version = '0.1.0'
|
|
241
|
+
|
|
242
|
+
self.assertIsNone(Package._existing_license_file_patterns)
|
|
243
|
+
Package.prepare()
|
|
244
|
+
self.assertIsNotNone(Package._existing_license_file_patterns)
|
|
245
|
+
assert Package._existing_license_file_patterns is not None
|
|
246
|
+
self.assertGreater(len(Package._existing_license_file_patterns), 0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/__init__.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/git_query.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/parser.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/patterns.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/py.typed
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/py_query.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/query.py
RENAMED
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates/bundled_version_query/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boilerplates-1.2.0.dev0 → boilerplates-1.2.0.dev2}/boilerplates.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|