| 1 |
#!/usr/bin/env python3 |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
# |
| 15 |
|
| 16 |
import os |
| 17 |
import sys |
| 18 |
|
| 19 |
try: |
| 20 |
from setuptools import setup, find_packages |
| 21 |
except ImportError: |
| 22 |
print( |
| 23 |
"BuildStream requires setuptools in order to locate plugins. Install " |
| 24 |
"it using your package manager (usually python3-setuptools) or via " |
| 25 |
"pip (pip3 install setuptools)." |
| 26 |
) |
| 27 |
sys.exit(1) |
| 28 |
|
| 29 |
############################################################################### |
| 30 |
# Parse README # |
| 31 |
############################################################################### |
| 32 |
with open( |
| 33 |
os.path.join(os.path.dirname(os.path.realpath(__file__)), "README.rst"), |
| 34 |
encoding="utf-8", |
| 35 |
) as readme: |
| 36 |
long_description = readme.read() |
| 37 |
|
| 38 |
############################################################################### |
| 39 |
# Load the version # |
| 40 |
############################################################################### |
| 41 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src")) |
| 42 |
from buildstream_plugins import __version__ # pylint: disable=wrong-import-position |
| 43 |
|
| 44 |
|
| 45 |
setup( |
| 46 |
name="buildstream-plugins", |
| 47 |
version=__version__, |
| 48 |
author="The Apache Software Foundation", |
| 49 |
author_email="[email protected]", |
| 50 |
classifiers=[ |
| 51 |
"Environment :: Console", |
| 52 |
"Intended Audience :: Developers", |
| 53 |
"License :: OSI Approved :: Apache Software License", |
| 54 |
"Operating System :: POSIX", |
| 55 |
"Programming Language :: Python :: 3", |
| 56 |
"Programming Language :: Python :: 3.10", |
| 57 |
"Programming Language :: Python :: 3.11", |
| 58 |
"Programming Language :: Python :: 3.12", |
| 59 |
"Programming Language :: Python :: 3.13", |
| 60 |
"Programming Language :: Python :: 3.14", |
| 61 |
"Topic :: Software Development :: Build Tools", |
| 62 |
], |
| 63 |
description="A collection of plugins for BuildStream.", |
| 64 |
long_description=long_description, |
| 65 |
long_description_content_type="text/x-rst; charset=UTF-8", |
| 66 |
license="Apache License Version 2.0", |
| 67 |
url="https://buildstream.build", |
| 68 |
project_urls={ |
| 69 |
"Documentation": "https://apache.github.io/buildstream-plugins/", |
| 70 |
"Source": "https://github.com/apache/buildstream-plugins/", |
| 71 |
"Tracker": "https://github.com/apache/buildstream-plugins/issues", |
| 72 |
"Mailing List": "https://lists.apache.org/[email protected]", |
| 73 |
}, |
| 74 |
package_dir={"": "src"}, |
| 75 |
packages=find_packages(where="src"), |
| 76 |
include_package_data=True, |
| 77 |
entry_points={ |
| 78 |
"buildstream.plugins.elements": [ |
| 79 |
"autotools = buildstream_plugins.elements.autotools", |
| 80 |
"cmake = buildstream_plugins.elements.cmake", |
| 81 |
"make = buildstream_plugins.elements.make", |
| 82 |
"meson = buildstream_plugins.elements.meson", |
| 83 |
"pip = buildstream_plugins.elements.pip", |
| 84 |
"setuptools = buildstream_plugins.elements.setuptools", |
| 85 |
], |
| 86 |
"buildstream.plugins.sources": [ |
| 87 |
"bzr = buildstream_plugins.sources.bzr", |
| 88 |
"cargo = buildstream_plugins.sources.cargo", |
| 89 |
"docker = buildstream_plugins.sources.docker", |
| 90 |
"git = buildstream_plugins.sources.git", |
| 91 |
"patch = buildstream_plugins.sources.patch", |
| 92 |
"pip = buildstream_plugins.sources.pip", |
| 93 |
"zip = buildstream_plugins.sources.zip", |
| 94 |
], |
| 95 |
"buildstream.plugins.sourcemirrors": [ |
| 96 |
"gitlab_lfs_mirror = buildstream_plugins.sourcemirrors.gitlab_lfs_mirror", |
| 97 |
"simple_mirror = buildstream_plugins.sourcemirrors.simple_mirror", |
| 98 |
], |
| 99 |
}, |
| 100 |
extras_require={ |
| 101 |
"cargo": ['tomli; python_version < "3.11"'], |
| 102 |
}, |
| 103 |
zip_safe=False, |
| 104 |
) |
| 105 |
# eof setup() |