Skip to content

Commit f0396c0

Browse files
committed
Changed build files to match other repos
1 parent 22cf527 commit f0396c0

File tree

4 files changed

+96
-26
lines changed

4 files changed

+96
-26
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ current_version = 0.1.10
33
commit = True
44
tag = True
55

6-
[bumpversion:file:setup.py]
6+
[bumpversion:file:__pkginfo__.py]
77

88
[bumpversion:file:domdf_python_tools/__init__.py]
99

__pkginfo__.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (C) 2019 Dominic Davis-Foster <[email protected]>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+
# This script based on https://github.com/rocky/python-uncompyle6/blob/master/__pkginfo__.py
17+
18+
copyright = """
19+
2019 Dominic Davis-Foster <[email protected]>
20+
"""
21+
22+
VERSION = "0.1.10"
23+
24+
modname = "domdf_python_tools"
25+
py_modules = None
26+
entry_points = None
27+
28+
license = 'GPL3'
29+
30+
short_desc = 'Helpful functions for Python'
31+
32+
classifiers = ['Development Status :: 4 - Beta',
33+
'Intended Audience :: Developers',
34+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
35+
'Operating System :: OS Independent',
36+
'Programming Language :: Python',
37+
'Programming Language :: Python :: 3.6',
38+
'Programming Language :: Python :: 3.7',
39+
'Programming Language :: Python :: 3.8',
40+
'Topic :: Software Development :: Libraries :: Python Modules',
41+
]
42+
43+
author = "Dominic Davis-Foster"
44+
author_email = "[email protected]"
45+
github_username = "domdfcoding"
46+
web = github_url = f"https://github.com/{github_username}/{modname}"
47+
48+
install_requires = []
49+
50+
51+
import os.path
52+
def get_srcdir():
53+
filename = os.path.normcase(os.path.dirname(os.path.abspath(__file__)))
54+
return os.path.realpath(filename)
55+
56+
srcdir = get_srcdir()
57+
58+
def read(*rnames):
59+
return open(os.path.join(srcdir, *rnames)).read()
60+
61+
# Get info from files; set: long_description
62+
long_description = ( read("README.rst") + '\n' )

doc-source/conf.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4-
import sys
4+
#### No need to change anything in this file ####
5+
56
import os
67
import re
8+
import sys
79

810
sys.path.append(os.path.abspath('.'))
911
sys.path.append(os.path.abspath('..'))
10-
sys.path.append(os.path.abspath('./demo/'))
1112

1213
from sphinx.locale import _
1314

14-
15-
project = "domdf_python_tools"
1615
from domdf_python_tools import __author__, __version__, __copyright__
16+
from __pkginfo__ import github_username, modname
17+
18+
github_url = f"https://github.com/{github_username}/{modname}"
1719

20+
rst_prolog = f""".. |pkgname| replace:: {modname}
21+
.. |pkgname2| replace:: ``{modname}``
22+
.. |browse_github| replace:: `Browse the GitHub Repository <{github_url}>`__
23+
.. |ghurl| replace:: {github_url}
24+
"""
1825

26+
project = modname
1927
slug = re.sub(r'\W+', '-', project.lower())
2028
version = __version__
2129
release = __version__

setup.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
from setuptools import setup, find_packages
1+
#!/usr/bin/env python
2+
"""Setup script"""
23

3-
with open("README.rst", "r") as fh:
4-
long_description = fh.read()
4+
from __pkginfo__ import \
5+
author, author_email, install_requires, \
6+
license, long_description, classifiers, \
7+
entry_points, modname, py_modules, \
8+
short_desc, VERSION, web
59

10+
from setuptools import setup, find_packages
611
setup(
7-
name="domdf_python_tools",
8-
version="0.1.10",
9-
author='Dominic Davis-Foster',
10-
author_email="[email protected]",
11-
packages=find_packages(),
12-
license="OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
13-
url="https://github.com/domdfcoding/domdf_python_tools",
14-
description='Helpful functions for Python',
15-
long_description=long_description,
16-
long_description_content_type="text/x-rst",
17-
classifiers=[
18-
"Programming Language :: Python :: 3",
19-
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
20-
"Operating System :: OS Independent",
21-
"Development Status :: 4 - Beta",
22-
],
23-
24-
)
12+
author = author,
13+
author_email = author_email,
14+
classifiers = classifiers,
15+
description = short_desc,
16+
entry_points = entry_points,
17+
install_requires = install_requires,
18+
license = license,
19+
long_description = long_description,
20+
name = modname,
21+
packages = find_packages(),
22+
py_modules = py_modules,
23+
url = web,
24+
version = VERSION)

0 commit comments

Comments
 (0)