Skip to content

Commit dc743db

Browse files
mgautierfrrenaud gaudin
authored andcommitted
Move all constants from setup.py to setup.cfg.
1 parent 80e9f1a commit dc743db

File tree

2 files changed

+53
-56
lines changed

2 files changed

+53
-56
lines changed

setup.cfg

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[metadata]
2+
name = libzim
3+
version = 1.0.0.dev0
4+
url = https://github.com/openzim/python-libzim
5+
project_urls =
6+
Source = https://github.com/openzim/python-libzim
7+
Bug Tracker = https://github.com/openzim/python-libzim/issues
8+
Changelog = https://github.com/openzim/python-libzim/releases
9+
Documentation = https://github.com/openzim/python-libzim/blob/master/README.md
10+
Donate = https://www.kiwix.org/en/support-us/
11+
description = A python-facing API for creating and interacting with ZIM files
12+
author = Monadical Inc.
13+
author_email = [email protected]
14+
long_description = file: README.md
15+
long_description_content_type = text/markdown
16+
license = GPL-3.0-or-later
17+
classifiers =
18+
Development Status :: 3 - Alpha
19+
Topic :: Utilities
20+
Topic :: Software Development :: Libraries
21+
Topic :: Software Development :: Libraries :: Python Modules
22+
Topic :: System :: Archiving
23+
Topic :: System :: Archiving :: Compression
24+
Topic :: System :: Archiving :: Mirroring
25+
Topic :: System :: Archiving :: Backup
26+
Topic :: Internet :: WWW/HTTP
27+
Topic :: Internet :: WWW/HTTP :: Indexing/Search
28+
Topic :: Sociology :: History
29+
Intended Audience :: Developers
30+
Intended Audience :: Education
31+
Intended Audience :: End Users/Desktop
32+
Intended Audience :: Information Technology
33+
Intended Audience :: System Administrators
34+
Programming Language :: Cython
35+
Programming Language :: Python :: 3
36+
Programming Language :: Python :: 3.6
37+
Programming Language :: Python :: 3.7
38+
Programming Language :: Python :: 3.8
39+
Programming Language :: Python :: 3.9
40+
#Typing :: Typed
41+
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
42+
Natural Language :: English
43+
Operating System :: OS Independent
44+
45+
[options]
46+
include_package_data = True
47+
zim_safe = False
48+
packages =
49+
libzim
50+
python_requires =
51+
>=3.6
52+
53+

setup.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from Cython.Build import cythonize
3838
from Cython.Distutils.build_ext import new_build_ext as build_ext
3939

40-
GITHUB_URL = "https://github.com/openzim/python-libzim"
4140
BASE_DIR = Path(__file__).parent
4241
LIBZIM_INCLUDE_DIR = "include" # the libzim C++ header src dir (containing zim/*.h)
4342
LIBZIM_LIBRARY_DIR = "lib" # the libzim .so binary lib dir (containing libzim.so)
@@ -86,10 +85,6 @@ def finalize_options(self):
8685
print("Using system installed library. We are assuming CFLAGS/LDFLAGS are correctly set.")
8786

8887

89-
def get_long_description():
90-
return (BASE_DIR / "README.md").read_text()
91-
92-
9388
wrapper_extension = Extension(
9489
name="libzim",
9590
sources=["libzim/libzim.pyx", "libzim/libwrapper.cpp"],
@@ -108,58 +103,7 @@ def get_long_description():
108103
compiler_directives.update({"linetrace": "True"})
109104

110105
setup(
111-
# Basic information about libzim module
112-
name="libzim",
113-
version="1.0.0.dev0",
114-
url=GITHUB_URL,
115-
project_urls={
116-
"Source": GITHUB_URL,
117-
"Bug Tracker": f"{GITHUB_URL}/issues",
118-
"Changelog": f"{GITHUB_URL}/releases",
119-
"Documentation": f"{GITHUB_URL}/blob/master/README.md",
120-
"Donate": "https://www.kiwix.org/en/support-us/",
121-
},
122-
author="Monadical Inc.",
123-
author_email="[email protected]",
124-
license="GPL-3.0-or-later",
125-
description="A python-facing API for creating and interacting with ZIM files",
126-
long_description=get_long_description(),
127-
long_description_content_type="text/markdown",
128-
python_requires=">=3.6",
129106
# Content
130-
packages=["libzim"],
131107
cmdclass={"build_ext": fixed_build_ext},
132108
ext_modules=cythonize([wrapper_extension], compiler_directives=compiler_directives),
133-
# Packaging
134-
include_package_data=True,
135-
zip_safe=False,
136-
# Extra
137-
classifiers=[
138-
"Development Status :: 3 - Alpha",
139-
"Topic :: Utilities",
140-
"Topic :: Software Development :: Libraries",
141-
"Topic :: Software Development :: Libraries :: Python Modules",
142-
"Topic :: System :: Archiving",
143-
"Topic :: System :: Archiving :: Compression",
144-
"Topic :: System :: Archiving :: Mirroring",
145-
"Topic :: System :: Archiving :: Backup",
146-
"Topic :: Internet :: WWW/HTTP",
147-
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
148-
"Topic :: Sociology :: History",
149-
"Intended Audience :: Developers",
150-
"Intended Audience :: Education",
151-
"Intended Audience :: End Users/Desktop",
152-
"Intended Audience :: Information Technology",
153-
"Intended Audience :: System Administrators",
154-
"Programming Language :: Cython",
155-
"Programming Language :: Python :: 3",
156-
"Programming Language :: Python :: 3.6",
157-
"Programming Language :: Python :: 3.7",
158-
"Programming Language :: Python :: 3.8",
159-
"Programming Language :: Python :: 3.9",
160-
# "Typing :: Typed",
161-
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
162-
"Natural Language :: English",
163-
"Operating System :: OS Independent",
164-
],
165109
)

0 commit comments

Comments
 (0)