Skip to content

Commit 2bc2a92

Browse files
1 parent 0867564 commit 2bc2a92

File tree

2 files changed

+62
-56
lines changed

2 files changed

+62
-56
lines changed

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "python-gitlab"
7+
dynamic = ["version", "readme"]
8+
description = "Interact with GitLab API"
9+
authors = [
10+
{ name="Gauvain Pocentek", email="gauvain@pocentek.net" },
11+
{ name="Max Wittig", email="max.wittig@siemens.com" },
12+
{ name="Nejc Habjan", email="nejc.habjan@siemens.com" },
13+
{ name="Roger Meier", email="r.meier@siemens.com" },
14+
{ name="John L. Villalovos", email="john@sodarock.com" },
15+
]
16+
license = {text = "LGPL-3.0-or-later"}
17+
dependencies = ["requests>=2.25.0", "requests-toolbelt>=0.10.1"]
18+
requires-python = ">=3.7.0"
19+
20+
classifiers = [
21+
"Development Status :: 5 - Production/Stable",
22+
"Environment :: Console",
23+
"Intended Audience :: System Administrators",
24+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
25+
"Natural Language :: English",
26+
"Operating System :: POSIX",
27+
"Operating System :: Microsoft :: Windows",
28+
"Programming Language :: Python",
29+
"Programming Language :: Python :: 3",
30+
"Programming Language :: Python :: 3.7",
31+
"Programming Language :: Python :: 3.8",
32+
"Programming Language :: Python :: 3.9",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
]
36+
37+
[project.optional-dependencies]
38+
autocompletion = ["argcomplete>=1.10.0,<3"]
39+
yaml = ["PyYaml>=5.2"]
40+
41+
[tool.setuptools]
42+
license-files = ["COPYING", "AUTHORS"]
43+
44+
[tool.setuptools.package-data]
45+
gitlab = ["py.typed"]
46+
47+
[tool.setuptools.dynamic]
48+
version = {attr = "gitlab.._version.__version__"}
49+
readme = {file = ["README.rst"]}
50+
51+
[tool.setuptools.packages.find]
52+
exclude = ["docs*", "tests*"]
53+
54+
[project.scripts]
55+
gitlab = "gitlab.cli:main"
56+
57+
[project.urls]
58+
"Homepage" = "https://github.com/python-gitlab/python-gitlab"
59+
"Bug Tracker" = "https://github.com/python-gitlab/python-gitlab/issues"
60+
161
[tool.isort]
262
profile = "black"
363
multi_line_output = 3

setup.py

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,3 @@
1-
#!/usr/bin/python
2-
# -*- coding: utf-8 -*-
1+
from setuptools import setup
32

4-
from setuptools import find_packages, setup
5-
6-
7-
def get_version() -> str:
8-
version = ""
9-
with open("gitlab/_version.py", "r", encoding="utf-8") as f:
10-
for line in f:
11-
if line.startswith("__version__"):
12-
version = eval(line.split("=")[-1])
13-
break
14-
return version
15-
16-
17-
with open("README.rst", "r", encoding="utf-8") as f:
18-
readme = f.read()
19-
20-
setup(
21-
name="python-gitlab",
22-
version=get_version(),
23-
description="Interact with GitLab API",
24-
long_description=readme,
25-
long_description_content_type="text/x-rst",
26-
author="Gauvain Pocentek",
27-
author_email="gauvain@pocentek.net",
28-
license="LGPL-3.0-or-later",
29-
url="https://github.com/python-gitlab/python-gitlab",
30-
packages=find_packages(exclude=["docs*", "tests*"]),
31-
install_requires=["requests>=2.25.0", "requests-toolbelt>=0.10.1"],
32-
package_data={
33-
"gitlab": ["py.typed"],
34-
},
35-
python_requires=">=3.7.0",
36-
entry_points={"console_scripts": ["gitlab = gitlab.cli:main"]},
37-
classifiers=[
38-
"Development Status :: 5 - Production/Stable",
39-
"Environment :: Console",
40-
"Intended Audience :: System Administrators",
41-
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
42-
"Natural Language :: English",
43-
"Operating System :: POSIX",
44-
"Operating System :: Microsoft :: Windows",
45-
"Programming Language :: Python",
46-
"Programming Language :: Python :: 3",
47-
"Programming Language :: Python :: 3.7",
48-
"Programming Language :: Python :: 3.8",
49-
"Programming Language :: Python :: 3.9",
50-
"Programming Language :: Python :: 3.10",
51-
"Programming Language :: Python :: 3.11",
52-
],
53-
extras_require={
54-
"autocompletion": ["argcomplete>=1.10.0,<3"],
55-
"yaml": ["PyYaml>=5.2"],
56-
},
57-
)
3+
setup()

0 commit comments

Comments
 (0)