diff --git a/Pipfile b/Pipfile index 757517c..c2d6191 100644 --- a/Pipfile +++ b/Pipfile @@ -15,6 +15,7 @@ Sphinx = "*" "flake8" = "*" twine = "*" moto = {extras = ["all", "ec2", "s3"], version = "*"} +setuptools-scm = "*" [requires] python_version = "3.9" diff --git a/Pipfile.lock b/Pipfile.lock index 806a242..f1d2f3c 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "e4a6d25d6ef7714754f0e586797ed9c5df9f94dd51aab007c81ec16c458356cb" + "sha256": "9d7b9c302403cee2766a86e81735f02556659e6e9455ccf03b4142de5fa155b2" }, "pipfile-spec": 6, "requires": { @@ -453,7 +453,7 @@ "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670", "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23" ], - "markers": "python_version < '3.10'", + "markers": "python_version >= '3.7'", "version": "==4.12.0" }, "jaraco.classes": { @@ -636,7 +636,7 @@ "sha256:2c64907728c3ef78e23711c8840a423f0b241588c9ed929855e4b2d1bb0cf5f2", "sha256:9bae709212a19222892cabcc60cafd903cbf4b220223f48583afa3c0e3cc6fc4" ], - "markers": "python_version >= '3.7' and python_full_version < '4.0.0'", + "markers": "python_version >= '3.7' and python_version < '4'", "version": "==0.2.3" }, "openapi-spec-validator": { @@ -830,7 +830,7 @@ "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983", "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349" ], - "markers": "python_version >= '3.7' and python_full_version < '4.0.0'", + "markers": "python_version >= '3.7' and python_version < '4'", "version": "==2.28.1" }, "requests-toolbelt": { @@ -861,7 +861,7 @@ "sha256:2eb4e6894cde1e017976d2975ac210ef515d7548bc595ba20e195fb9628acdeb", "sha256:63a5c5ce3673d3d5fbbf23cd87e11ab84b6b451436f1b7f19ec54b6bc36ed7ca" ], - "markers": "python_full_version >= '3.6.3' and python_full_version < '4.0.0'", + "markers": "python_version < '4' and python_full_version >= '3.6.3'", "version": "==12.5.1" }, "rsa": { @@ -869,7 +869,7 @@ "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7", "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21" ], - "markers": "python_version >= '3.6' and python_full_version < '4.0.0'", + "markers": "python_version >= '3.6' and python_version < '4'", "version": "==4.9" }, "s3transfer": { @@ -904,6 +904,14 @@ "markers": "python_version >= '3.7'", "version": "==65.3.0" }, + "setuptools-scm": { + "hashes": [ + "sha256:031e13af771d6f892b941adb6ea04545bbf91ebc5ce68c78aaf3fff6e1fb4844", + "sha256:7930f720905e03ccd1e1d821db521bff7ec2ac9cf0ceb6552dd73d24a45d3b02" + ], + "index": "pypi", + "version": "==7.0.5" + }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", @@ -990,6 +998,14 @@ ], "version": "==3.3.1" }, + "tomli": { + "hashes": [ + "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" + ], + "markers": "python_version >= '3.7'", + "version": "==2.0.1" + }, "twine": { "hashes": [ "sha256:42026c18e394eac3e06693ee52010baa5313e4811d5a11050e7d48436cf41b9e", @@ -998,6 +1014,14 @@ "index": "pypi", "version": "==4.0.1" }, + "typing-extensions": { + "hashes": [ + "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", + "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" + ], + "markers": "python_version >= '3.7'", + "version": "==4.3.0" + }, "urllib3": { "hashes": [ "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e", diff --git a/README.md b/README.md index 3cee269..ec24fba 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,9 @@ A set of helpers for baking your Django site out as flat files -* Documentation: [http://django-bakery.rtfd.org](http://django-bakery.rtfd.org) +* Documentation: [palewi.re/docs/django-bakery](https://palewi.re/docs/docs/django-bakery/) * Issues: [https://github.com/datadesk/django-bakery/issues](https://github.com/datadesk/django-bakery/issues) * Packaging: [https://pypi.python.org/pypi/django-bakery](https://pypi.python.org/pypi/django-bakery) -* Testing: [https://travis-ci.org/datadesk/django-bakery](https://travis-ci.org/datadesk/django-bakery) -* Coverage: [https://coveralls.io/r/datadesk/django-bakery](https://coveralls.io/r/datadesk/django-bakery) * The dream, in Powerpoint form: [http://lat.ms/bakery-talk](http://lat.ms/bakery-talk) ## Features diff --git a/docs/index.rst b/docs/index.rst index 0911419..e08ac7b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -69,8 +69,6 @@ or require more complex views. Contributing ------------ -* Code repository: `https://github.com/datadesk/django-bakery `_ +* Code repository: `https://palewi.re/docs/docs/django-bakery/ `_ * Issues: `https://github.com/datadesk/django-bakery/issues `_ -* Packaging: `https://pypi.python.org/pypi/django-bakery `_ -* Testing: `https://travis-ci.org/datadesk/django-bakery `_ -* Coverage: `https://coveralls.io/r/datadesk/django-bakery `_ +* Packaging: `https://pypi.python.org/pypi/django-bakery `_ \ No newline at end of file diff --git a/setup.py b/setup.py index b951bc6..80fe898 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,31 @@ def read(file_name): return f.read() +def version_scheme(version): + """Version scheme hack for setuptools_scm. + Appears to be necessary to due to the bug documented here: https://github.com/pypa/setuptools_scm/issues/342 + If that issue is resolved, this method can be removed. + """ + import time + + from setuptools_scm.version import guess_next_version + + if version.exact: + return version.format_with("{tag}") + else: + _super_value = version.format_next_version(guess_next_version) + now = int(time.time()) + return _super_value + str(now) + + +def local_version(version): + """Local version scheme hack for setuptools_scm. + Appears to be necessary to due to the bug documented here: https://github.com/pypa/setuptools_scm/issues/342 + If that issue is resolved, this method can be removed. + """ + return "" + + class TestCommand(Command): user_options = [] @@ -97,7 +122,6 @@ def run(self): setup( name='django-bakery', - version='0.12.7', description='A set of helpers for baking your Django site out as flat files', long_description=read("README.md"), long_description_content_type="text/markdown", @@ -118,15 +142,15 @@ def run(self): classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', + 'Framework :: Django :: 2', + 'Framework :: Django :: 3', + 'Framework :: Django :: 4', 'License :: OSI Approved :: MIT License', ], install_requires=[ @@ -134,5 +158,7 @@ def run(self): 'boto3>=1.4.4', 'fs>=2.0.17', ], - cmdclass={'test': TestCommand} + cmdclass={'test': TestCommand}, + setup_requires=["setuptools_scm"], + use_scm_version={"version_scheme": version_scheme, "local_scheme": local_version}, )