diff options
author | John L. Villalovos <john@sodarock.com> | 2023-02-03 18:30:10 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2023-02-03 18:30:10 -0800 |
commit | 2bc2a9278de5e4ff3f439fd91dcc7fbf9bb84c7c (patch) | |
tree | c49e9a776e88af4a715cb72dd9abdab6393b8350 | |
parent | 08675643e6b306d3ae101b173609a6c363c9f3df (diff) | |
download | gitlab-jlvillal/pip_build.tar.gz |
WIP: DO NOT MERGEjlvillal/pip_build
Playing around with https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
-rw-r--r-- | pyproject.toml | 60 | ||||
-rw-r--r-- | setup.py | 58 |
2 files changed, 62 insertions, 56 deletions
diff --git a/pyproject.toml b/pyproject.toml index 7441130..50dfd71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,63 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "python-gitlab" +dynamic = ["version", "readme"] +description = "Interact with GitLab API" +authors = [ + { name="Gauvain Pocentek", email="gauvain@pocentek.net" }, + { name="Max Wittig", email="max.wittig@siemens.com" }, + { name="Nejc Habjan", email="nejc.habjan@siemens.com" }, + { name="Roger Meier", email="r.meier@siemens.com" }, + { name="John L. Villalovos", email="john@sodarock.com" }, +] +license = {text = "LGPL-3.0-or-later"} +dependencies = ["requests>=2.25.0", "requests-toolbelt>=0.10.1"] +requires-python = ">=3.7.0" + +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Natural Language :: English", + "Operating System :: POSIX", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] + +[project.optional-dependencies] +autocompletion = ["argcomplete>=1.10.0,<3"] +yaml = ["PyYaml>=5.2"] + +[tool.setuptools] +license-files = ["COPYING", "AUTHORS"] + +[tool.setuptools.package-data] +gitlab = ["py.typed"] + +[tool.setuptools.dynamic] +version = {attr = "gitlab.._version.__version__"} +readme = {file = ["README.rst"]} + +[tool.setuptools.packages.find] +exclude = ["docs*", "tests*"] + +[project.scripts] +gitlab = "gitlab.cli:main" + +[project.urls] +"Homepage" = "https://github.com/python-gitlab/python-gitlab" +"Bug Tracker" = "https://github.com/python-gitlab/python-gitlab/issues" + [tool.isort] profile = "black" multi_line_output = 3 @@ -1,57 +1,3 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- +from setuptools import setup -from setuptools import find_packages, setup - - -def get_version() -> str: - version = "" - with open("gitlab/_version.py", "r", encoding="utf-8") as f: - for line in f: - if line.startswith("__version__"): - version = eval(line.split("=")[-1]) - break - return version - - -with open("README.rst", "r", encoding="utf-8") as f: - readme = f.read() - -setup( - name="python-gitlab", - version=get_version(), - description="Interact with GitLab API", - long_description=readme, - long_description_content_type="text/x-rst", - author="Gauvain Pocentek", - author_email="gauvain@pocentek.net", - license="LGPL-3.0-or-later", - url="https://github.com/python-gitlab/python-gitlab", - packages=find_packages(exclude=["docs*", "tests*"]), - install_requires=["requests>=2.25.0", "requests-toolbelt>=0.10.1"], - package_data={ - "gitlab": ["py.typed"], - }, - python_requires=">=3.7.0", - entry_points={"console_scripts": ["gitlab = gitlab.cli:main"]}, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", - "Natural Language :: English", - "Operating System :: POSIX", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - extras_require={ - "autocompletion": ["argcomplete>=1.10.0,<3"], - "yaml": ["PyYaml>=5.2"], - }, -) +setup() |