Skip to content

Commit b3f1b77

Browse files
committed
improvement(packaging): move build data to setup.cfg
Moves build data from setup.py to setup.cfg also adds pyproject.toml for specify a build-system.
1 parent 4818db4 commit b3f1b77

File tree

4 files changed

+54
-49
lines changed

4 files changed

+54
-49
lines changed

pybooru/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
resources -- Contains all resources for Pybooru.
1818
"""
1919

20-
__version__ = "4.2.2"
20+
__version__ = "5.0.0.dev1"
2121
__license__ = "MIT"
2222
__source_url__ = "https://github.com/LuqueDaniel/pybooru"
2323
__author__ = "Daniel Luque <danielluque14[at]gmail[dot]com>"

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools >= 59.7.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
1+
[metadata]
2+
name = Pybooru
3+
version = 5.0.0.dev1
4+
description = A package to access to Danbooru/Moebooru APIs
5+
url = https://github.com/LuqueDaniel/pybooru
6+
license = MIT License
7+
author = Daniel Luque
8+
author_email = [email protected]
9+
project_urls =
10+
Documentation = https://pybooru.readthedocs.io/en/latest/
11+
Source = https://github.com/LuqueDaniel/pybooru
12+
Issues = https://github.com/LuqueDaniel/pybooru/issues
13+
Changelog = https://github.com/LuqueDaniel/pybooru/blob/master/changelog.md
14+
keywords = Pybooru, moebooru, danbooru, API, client
15+
classifiers =
16+
Development Status :: 5 - Production/Stable
17+
Programming Language :: Python
18+
Programming Language :: Python :: 2.7
19+
Programming Language :: Python :: 3
20+
Programming Language :: Python :: 3.5
21+
Programming Language :: Python :: 3.6
22+
Programming Language :: Python :: 3.7
23+
Programming Language :: Python :: 3.8
24+
Intended Audience :: Developers
25+
License :: OSI Approved :: MIT License
26+
Topic :: Documentation :: Sphinx
27+
Topic :: Software Development :: Libraries :: Python Modules
28+
Topic :: Internet
29+
platforms = any
30+
long_description = file: README.md
31+
long_description_content_type = text/markdown; charset=UTF-8
32+
license_files = LICENSE
33+
34+
[options]
35+
packages = pybooru
36+
install_requires =
37+
requests >= 2.26
38+
python_requires = >= 3.6
39+
include_package_data = True
40+
41+
[options.extras_require]
42+
docs =
43+
Sphinx
44+
sphinx-rtd-theme
45+
all =
46+
%(docs)s
47+
148
[bdist_wheel]
249
universal = 1

setup.py

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,5 @@
1-
# -*- coding utf-8 -*-
21
# !/usr/bin/env python
2+
import setuptools
33

4-
# setuptools imports
5-
from setuptools import setup
6-
from setuptools import find_packages
7-
8-
# pybooru imports
9-
import pybooru
10-
11-
12-
# Read description file
13-
with open('README.md', 'r') as f:
14-
long_description = f.read()
15-
16-
17-
setup(
18-
name="Pybooru",
19-
version=pybooru.__version__,
20-
author=pybooru.__author__,
21-
description="Pybooru is a Python package to access to the API of Danbooru/Moebooru based sites.",
22-
long_description=long_description,
23-
long_description_content_type="text/markdown",
24-
author_email="[email protected]",
25-
url="https://github.com/LuqueDaniel/pybooru",
26-
license="MIT License",
27-
keywords="Pybooru moebooru danbooru API client",
28-
packages=find_packages(),
29-
platforms=['any'],
30-
install_requires=['requests'],
31-
include_package_data=True,
32-
data_file=[
33-
('', ['LICENSE', 'README.md', 'changelog.md', 'requirements.txt'])
34-
],
35-
classifiers=[
36-
"Development Status :: 5 - Production/Stable",
37-
"Programming Language :: Python",
38-
"Programming Language :: Python :: 2.7",
39-
"Programming Language :: Python :: 3",
40-
"Programming Language :: Python :: 3.5",
41-
"Programming Language :: Python :: 3.6",
42-
"Programming Language :: Python :: 3.7",
43-
"Programming Language :: Python :: 3.8",
44-
"Intended Audience :: Developers",
45-
"License :: OSI Approved :: MIT License",
46-
"Topic :: Documentation :: Sphinx",
47-
"Topic :: Software Development :: Libraries :: Python Modules",
48-
"Topic :: Internet"
49-
],
50-
)
4+
if __name__ == "__main__":
5+
setuptools.setup()

0 commit comments

Comments
 (0)