generated from palewire/python-open-source-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,33 @@ def read(fname): | |
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 = [] | ||
|
||
|
@@ -42,15 +69,14 @@ def run(self): | |
|
||
setup( | ||
name="django-anss-archive", | ||
version="0.0.4", | ||
description=( | ||
"A Django application to archive real-time earthquake " | ||
"notifications from the USGS's Advanced National Seismic System" | ||
), | ||
long_description=read("README.rst"), | ||
author="Los Angeles Times Data Desk", | ||
author_email="[email protected]", | ||
url="http://www.github.com/datadesk/django-anss-archive", | ||
author="Ben Welsh", | ||
author_email="[email protected]", | ||
url="https://palewi.re/docs/django-anss-archive/", | ||
license="MIT", | ||
packages=( | ||
"anss", | ||
|
@@ -63,13 +89,17 @@ def run(self): | |
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
project_urls={ | ||
"Maintainer": "https://github.com/datadesk", | ||
"Source": "https://github.com/datadesk/django-anss-archive", | ||
"Tracker": "https://github.com/datadesk/django-anss-archive/issues", | ||
"Maintainer": "https://github.com/palewire", | ||
"Source": "https://github.com/palewire/django-anss-archive", | ||
"Tracker": "https://github.com/palewire/django-anss-archive/issues", | ||
}, | ||
setup_requires=["setuptools_scm"], | ||
use_scm_version={"version_scheme": version_scheme, "local_scheme": local_version}, | ||
) |