Mike Frysinger | 08eb63c | 2020-12-01 13:21:06 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 2 | # Copyright 2019 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the 'License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | """Python packaging for repo.""" |
| 17 | |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 18 | import os |
Mike Frysinger | 6447733 | 2023-08-21 21:20:32 -0400 | [diff] [blame] | 19 | |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 20 | import setuptools |
| 21 | |
| 22 | |
| 23 | TOPDIR = os.path.dirname(os.path.abspath(__file__)) |
| 24 | |
| 25 | |
| 26 | # Rip out the first intro paragraph. |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 27 | with open(os.path.join(TOPDIR, "README.md")) as fp: |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 28 | lines = fp.read().splitlines()[2:] |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 29 | end = lines.index("") |
| 30 | long_description = " ".join(lines[0:end]) |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 31 | |
| 32 | |
| 33 | # https://packaging.python.org/tutorials/packaging-projects/ |
| 34 | setuptools.setup( |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 35 | name="repo", |
| 36 | version="2", |
| 37 | maintainer="Various", |
| 38 | maintainer_email="repo-discuss@googlegroups.com", |
| 39 | description="Repo helps manage many Git repositories", |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 40 | long_description=long_description, |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 41 | long_description_content_type="text/plain", |
| 42 | url="https://gerrit.googlesource.com/git-repo/", |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 43 | project_urls={ |
Mike Frysinger | 696e0c4 | 2023-06-14 17:08:27 -0400 | [diff] [blame] | 44 | "Bug Tracker": "https://issues.gerritcodereview.com/issues?q=is:open%20componentid:1370071", # noqa: E501 |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 45 | }, |
| 46 | # https://pypi.org/classifiers/ |
| 47 | classifiers=[ |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 48 | "Development Status :: 6 - Mature", |
| 49 | "Environment :: Console", |
| 50 | "Intended Audience :: Developers", |
| 51 | "License :: OSI Approved :: Apache Software License", |
| 52 | "Natural Language :: English", |
| 53 | "Operating System :: MacOS :: MacOS X", |
| 54 | "Operating System :: Microsoft :: Windows :: Windows 10", |
| 55 | "Operating System :: POSIX :: Linux", |
| 56 | "Programming Language :: Python :: 3", |
| 57 | "Programming Language :: Python :: 3 :: Only", |
| 58 | "Topic :: Software Development :: Version Control :: Git", |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 59 | ], |
Gavin Mak | ea2e330 | 2023-03-11 06:46:20 +0000 | [diff] [blame] | 60 | python_requires=">=3.6", |
| 61 | packages=["subcmds"], |
Mike Frysinger | 5b3a57c | 2019-12-01 21:56:07 -0500 | [diff] [blame] | 62 | ) |