Debian Codegraph @

setup.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #!/usr/bin/env python3
2
3 # Copyright 2008-2024 Canonical Ltd.
4 #
5 # This file is part of launchpadlib.
6 #
7 # launchpadlib is free software: you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as published by the
9 # Free Software Foundation, version 3 of the License.
10 #
11 # launchpadlib is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public License
17 # along with launchpadlib. If not, see <http://www.gnu.org/licenses/>.
18
19 """Setup for the launchpadlib library."""
20
21 from setuptools import setup, find_packages
22
23
24 # generic helpers primarily for the long_description
25 def generate(*docname_or_string):
26 marker = ".. pypi description ends here"
27 res = []
28 for value in docname_or_string:
29 if value.endswith(".rst"):
30 with open(value) as f:
31 value = f.read()
32 idx = value.find(marker)
33 if idx >= 0:
34 value = value[:idx]
35 res.append(value)
36 if not value.endswith("\n"):
37 res.append("")
38 return "\n".join(res)
39
40
41 # end generic helpers
42
43
44 install_requires = [
45 "httplib2",
46 "lazr.restfulclient>=0.14.2",
47 "lazr.uri",
48 ]
49
50 setup(
51 name="launchpadlib",
52 version="2.1.0",
53 packages=find_packages("src"),
54 package_dir={"": "src"},
55 include_package_data=True,
56 zip_safe=False,
57 author="The Launchpad developers",
58 author_email="[email protected]",
59 maintainer="LAZR Developers",
60 maintainer_email="[email protected]",
61 download_url="https://launchpad.net/launchpadlib/+download",
62 description=open("README.rst").readline().strip(),
63 long_description=generate("src/launchpadlib/docs/index.rst", "NEWS.rst"),
64 license="LGPL v3",
65 python_requires=">=3.8",
66 install_requires=install_requires,
67 url="https://help.launchpad.net/API/launchpadlib",
68 project_urls={
69 "Source": "https://code.launchpad.net/launchpadlib",
70 "Issue Tracker": "https://bugs.launchpad.net/launchpadlib",
71 "Documentation": "https://launchpadlib.readthedocs.io/en/latest/",
72 },
73 classifiers=[
74 "Development Status :: 5 - Production/Stable",
75 "Intended Audience :: Developers",
76 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", # noqa: E501
77 "Operating System :: OS Independent",
78 "Programming Language :: Python",
79 "Programming Language :: Python :: 3",
80 "Programming Language :: Python :: 3.8",
81 "Programming Language :: Python :: 3.9",
82 "Programming Language :: Python :: 3.10",
83 "Programming Language :: Python :: 3.11",
84 "Programming Language :: Python :: 3.12",
85 "Programming Language :: Python :: 3.13",
86 ],
87 extras_require={
88 "keyring": ["keyring"],
89 "docs": ["Sphinx"],
90 # Dependencies useful when testing other packages with launchpadlib.
91 "testing": [
92 "testresources",
93 "wadllib",
94 ],
95 # Dependencies only needed by launchpadlib's own tests.
96 "test": [
97 "coverage",
98 "pytest",
99 ],
100 },
101 )