Switch build to PBR.
This gets us: - Automatic changelog - Automatic authors list - Automatic git version management
This commit is contained in:
parent
dc22d7b32a
commit
b819afec39
11 changed files with 75 additions and 1113 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,8 +5,9 @@
|
||||||
/Comics
|
/Comics
|
||||||
/build
|
/build
|
||||||
/dist
|
/dist
|
||||||
/Changelog.dosage*
|
/ChangeLog
|
||||||
/testresults.txt
|
/testresults.txt
|
||||||
/dosage.prof
|
/dosage.prof
|
||||||
/dosage.egg-info
|
/dosage.egg-info
|
||||||
/scripts/*.json
|
/scripts/*.json
|
||||||
|
/AUTHORS
|
||||||
|
|
7
.mailmap
Normal file
7
.mailmap
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Bastian Kleineidam <bastian.kleineidam@web.de>
|
||||||
|
Bastian Kleineidam <bastian.kleineidam@web.de> <calvin@debian.org>
|
||||||
|
Dirk Reiners <reiners@destiny.ualr.edu> <dirkreiners@users.noreply.github.com>
|
||||||
|
Dirk Reiners <reiners@destiny.ualr.edu> <reiners@localhost-144-167-115-170.ddns.ualr.edu>
|
||||||
|
Helge Stasch <freestila@gmx.de>
|
||||||
|
Helge Stasch <freestila@gmx.de> <helge.stasch@inform-software.com>
|
||||||
|
Tobias Gruetzmacher <tobias-git@23.gs> <tobias-github@23.gs>
|
|
@ -1,3 +1,2 @@
|
||||||
exclude .git*
|
exclude .*
|
||||||
exclude .travis.yml
|
|
||||||
recursive-exclude scripts dosage.*
|
recursive-exclude scripts dosage.*
|
||||||
|
|
1031
doc/changelog.txt
1031
doc/changelog.txt
File diff suppressed because it is too large
Load diff
3
dosage
3
dosage
|
@ -15,6 +15,7 @@ import os
|
||||||
import argparse
|
import argparse
|
||||||
import pydoc
|
import pydoc
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
import dosagelib
|
||||||
from dosagelib import events, configuration, singleton, director
|
from dosagelib import events, configuration, singleton, director
|
||||||
from dosagelib.output import out
|
from dosagelib.output import out
|
||||||
from dosagelib.util import internal_error, strlimit
|
from dosagelib.util import internal_error, strlimit
|
||||||
|
@ -113,7 +114,7 @@ def displayVersion(verbose):
|
||||||
text = ('A new version %(version)s of %(app)s is '
|
text = ('A new version %(version)s of %(app)s is '
|
||||||
'available at %(url)s.')
|
'available at %(url)s.')
|
||||||
attrs = dict(version=version, app=configuration.AppName,
|
attrs = dict(version=version, app=configuration.AppName,
|
||||||
url=url, currentversion=configuration.Version)
|
url=url, currentversion=dosagelib.__version__)
|
||||||
print(text % attrs)
|
print(text % attrs)
|
||||||
else:
|
else:
|
||||||
if value is None:
|
if value is None:
|
||||||
|
|
|
@ -12,10 +12,9 @@ your intentions, and received permission to distribute.
|
||||||
The primary interface is the 'dosage' commandline script.
|
The primary interface is the 'dosage' commandline script.
|
||||||
Comic modules for each comic are located in L{dosagelib.plugins}.
|
Comic modules for each comic are located in L{dosagelib.plugins}.
|
||||||
"""
|
"""
|
||||||
import sys
|
|
||||||
if not (hasattr(sys, 'version_info') or
|
|
||||||
sys.version_info < (2, 7, 0, 'final', 0)):
|
|
||||||
raise SystemExit("This program requires Python 2.7 or later.")
|
|
||||||
|
|
||||||
# PEP 396
|
from pkg_resources import get_distribution
|
||||||
from .configuration import Version as __version__
|
|
||||||
|
AppName = u'dosage'
|
||||||
|
dist = get_distribution(AppName)
|
||||||
|
__version__ = dist.version # PEP 396
|
||||||
|
|
|
@ -4,14 +4,16 @@
|
||||||
Define basic configuration data like version or application name.
|
Define basic configuration data like version or application name.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
AppName = u'dosage'
|
from __future__ import print_function
|
||||||
Version = u'2.16' # Should be PEP 440 compatible
|
from . import __version__, AppName
|
||||||
App = AppName + u' ' + Version
|
|
||||||
|
App = AppName + u' ' + __version__
|
||||||
|
|
||||||
Maintainer = u'Tobias Gruetzmacher'
|
Maintainer = u'Tobias Gruetzmacher'
|
||||||
MaintainerEmail = u'tobias-dosage@23.gs'
|
MaintainerEmail = u'tobias-dosage@23.gs'
|
||||||
Url = u'http://dosage.rocks/'
|
Url = u'http://dosage.rocks/'
|
||||||
SupportUrl = u'https://github.com/webcomics/dosage/issues'
|
SupportUrl = u'https://github.com/webcomics/dosage/issues'
|
||||||
UserAgent = u"Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, Version, Url)
|
UserAgent = u"Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, __version__, Url)
|
||||||
Copyright = u"""Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
Copyright = u"""Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
||||||
Copyright (C) 2012-2014 Bastian Kleineidam
|
Copyright (C) 2012-2014 Bastian Kleineidam
|
||||||
Copyright (C) 2015 Tobias Gruetzmacher
|
Copyright (C) 2015 Tobias Gruetzmacher
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Function to check for updates.
|
Function to check for updates.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
from .configuration import Version as CurrentVersion
|
import dosagelib
|
||||||
from .util import urlopen
|
from .util import urlopen
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import StrictVersion
|
||||||
import requests
|
import requests
|
||||||
|
@ -29,7 +29,7 @@ def check_update ():
|
||||||
if version is None:
|
if version is None:
|
||||||
# value is an error message
|
# value is an error message
|
||||||
return False, value
|
return False, value
|
||||||
if version == CurrentVersion:
|
if version == dosagelib.__version__:
|
||||||
# user has newest version
|
# user has newest version
|
||||||
return True, None
|
return True, None
|
||||||
if is_newer_version(version):
|
if is_newer_version(version):
|
||||||
|
@ -55,4 +55,4 @@ def get_online_version ():
|
||||||
|
|
||||||
def is_newer_version (version):
|
def is_newer_version (version):
|
||||||
"""Check if given version is newer than current version."""
|
"""Check if given version is newer than current version."""
|
||||||
return StrictVersion(version) > StrictVersion(CurrentVersion)
|
return StrictVersion(version) > StrictVersion(dosagelib.__version__)
|
||||||
|
|
|
@ -1,7 +1 @@
|
||||||
# required:
|
|
||||||
requests>=2.0
|
requests>=2.0
|
||||||
# optional:
|
|
||||||
argcomplete
|
|
||||||
lxml
|
|
||||||
cssselect
|
|
||||||
Pillow
|
|
||||||
|
|
46
setup.cfg
Normal file
46
setup.cfg
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
[metadata]
|
||||||
|
name = dosage
|
||||||
|
maintainer = Tobias Gruetzmacher
|
||||||
|
maintainer-email = tobias-dosage@23.gs
|
||||||
|
summary = a comic strip downloader and archiver
|
||||||
|
description-file = doc/README.txt
|
||||||
|
home-page = http://dosage.rocks/
|
||||||
|
requires-python = >=2.7
|
||||||
|
license = MIT
|
||||||
|
platform = Any
|
||||||
|
keywords = comic,webcomic,downloader,archiver,crawler
|
||||||
|
classifier =
|
||||||
|
Environment :: Console
|
||||||
|
Intended Audience :: End Users/Desktop
|
||||||
|
Topic :: Multimedia :: Graphics
|
||||||
|
Topic :: Internet :: WWW/HTTP
|
||||||
|
Development Status :: 4 - Beta
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Programming Language :: Python
|
||||||
|
Programming Language :: Python :: 2
|
||||||
|
Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 3
|
||||||
|
Programming Language :: Python :: 3.3
|
||||||
|
Programming Language :: Python :: 3.4
|
||||||
|
Operating System :: OS Independent
|
||||||
|
|
||||||
|
[files]
|
||||||
|
packages =
|
||||||
|
dosagelib
|
||||||
|
data_files =
|
||||||
|
bin = dosage
|
||||||
|
|
||||||
|
[extras]
|
||||||
|
parser =
|
||||||
|
lxml
|
||||||
|
css =
|
||||||
|
cssselect
|
||||||
|
dimensions =
|
||||||
|
Pillow
|
||||||
|
bash =
|
||||||
|
argcomplete
|
||||||
|
test =
|
||||||
|
pytest-xdist
|
||||||
|
|
||||||
|
[bdist_wheel]
|
||||||
|
universal=1
|
62
setup.py
62
setup.py
|
@ -1,67 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-1 -*-
|
|
||||||
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
||||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||||
# Copyright (C) 2015 Tobias Gruetzmacher
|
# Copyright (C) 2015 Tobias Gruetzmacher
|
||||||
|
|
||||||
from __future__ import print_function
|
from setuptools import setup
|
||||||
import os
|
|
||||||
import codecs
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
def get_authors():
|
|
||||||
"""Read list of authors from a text file, filtering comments."""
|
|
||||||
authors = []
|
|
||||||
authorfile = os.path.join('doc', 'authors.txt')
|
|
||||||
with codecs.open(authorfile, 'r', 'utf-8') as f:
|
|
||||||
for line in f:
|
|
||||||
line = line.strip()
|
|
||||||
if line and not line.startswith(u'#'):
|
|
||||||
authors.append(line)
|
|
||||||
return u", ".join(authors)
|
|
||||||
|
|
||||||
|
|
||||||
config = {}
|
|
||||||
with codecs.open(os.path.join('dosagelib', 'configuration.py')) as fp:
|
|
||||||
exec(fp.read(), config)
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = config['AppName'],
|
setup_requires=['pbr'],
|
||||||
version = config['Version'],
|
pbr=True,
|
||||||
description = 'a comic strip downloader and archiver',
|
|
||||||
keywords = 'comic,webcomic,downloader,archiver',
|
|
||||||
author = get_authors(),
|
|
||||||
maintainer = config['Maintainer'],
|
|
||||||
maintainer_email = config['MaintainerEmail'],
|
|
||||||
license = 'MIT',
|
|
||||||
url = config['Url'],
|
|
||||||
packages = find_packages(exclude=['tests']),
|
|
||||||
scripts = (
|
|
||||||
'dosage',
|
|
||||||
),
|
|
||||||
classifiers = (
|
|
||||||
'Environment :: Console',
|
|
||||||
'Intended Audience :: End Users/Desktop',
|
|
||||||
'Topic :: Multimedia :: Graphics',
|
|
||||||
'Topic :: Internet :: WWW/HTTP',
|
|
||||||
'Development Status :: 4 - Beta',
|
|
||||||
'License :: OSI Approved :: MIT License',
|
|
||||||
'Programming Language :: Python',
|
|
||||||
'Programming Language :: Python :: 2',
|
|
||||||
'Programming Language :: Python :: 2.7',
|
|
||||||
'Programming Language :: Python :: 3',
|
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.4',
|
|
||||||
'Operating System :: OS Independent',
|
|
||||||
),
|
|
||||||
install_requires = (
|
|
||||||
'requests',
|
|
||||||
),
|
|
||||||
extras_require = {
|
|
||||||
'xpath': ["lxml"],
|
|
||||||
'css': ['cssselect'],
|
|
||||||
},
|
|
||||||
setup_requires = [
|
|
||||||
"setuptools_git >= 1.0",
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue