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
4 changed files
with
79 additions
and
11 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
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 |
---|---|---|
@@ -1,18 +1,79 @@ | ||
"""Package and distribute the library.""" | ||
import os | ||
|
||
from setuptools import setup | ||
|
||
install_requires = [ | ||
"six>=1.7.2", | ||
"tldextract==1.4", | ||
] | ||
|
||
def read(fname): | ||
"""Read in file.""" | ||
with open(os.path.join(os.path.dirname(__file__), fname)) as f: | ||
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 "" | ||
|
||
|
||
setup( | ||
name="storysniffer", | ||
version="0.0.3", | ||
description="Inspect a URL and estimate if it links to news story", | ||
long_description=read("README.md"), | ||
long_description_content_type="text/markdown", | ||
author="Ben Welsh", | ||
author_email="ben.welsh@gmail.com", | ||
author_email="b@palewi.re", | ||
url="https://github.com/pastpages/storysniffer", | ||
license="MIT", | ||
packages=("storysniffer",), | ||
install_requires=install_requires, | ||
install_requires=("tldextract",), | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Framework :: Django", | ||
"Framework :: Django :: 3", | ||
"Framework :: Django :: 4", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
setup_requires=["setuptools_scm"], | ||
use_scm_version={"version_scheme": version_scheme, "local_scheme": local_version}, | ||
project_urls={ | ||
"Documentation": "https://palewi.re/docs/storysniffer/", | ||
"Source": "https://github.com/datadesk/storysniffer/", | ||
"Tracker": "https://github.com/datadesk/storysniffer/issues", | ||
}, | ||
) |
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
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