Skip to content

Commit 799ccd5

Browse files
committed
packaging: restore setuptools for older architectures
1 parent 7451045 commit 799ccd5

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

packaging/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: python3-opensips
22
Section: python
33
Priority: optional
44
Maintainer: Razvan Crainea <razvan@opensips.org>
5-
Build-Depends: debhelper (>= 9), dh-python, python3 (>= 3.6), pybuild-plugin-pyproject, python3-hatchling, bash-completion
5+
Build-Depends: debhelper (>= 9), dh-python, python3 (>= 3.6), pybuild-plugin-pyproject | python3-setuptools, python3-hatchling | python3-setuptools, bash-completion
66
Standards-Version: 3.9.8
77
Homepage: https://github.com/OpenSIPS/python-opensips
88

setup.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env python3
2+
#
3+
# This file is part of the OpenSIPS Python Package
4+
# (see https://github.com/OpenSIPS/python-opensips).
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
"""Setuptools fallback for legacy distro package builds."""
20+
21+
from pathlib import Path
22+
23+
from setuptools import find_packages, setup
24+
25+
26+
def get_version() -> str:
27+
version = {}
28+
version_file = Path(__file__).parent / "opensips" / "version.py"
29+
exec(version_file.read_text(encoding="utf-8"), version)
30+
return version["__version__"]
31+
32+
33+
setup(
34+
name="opensips",
35+
version=get_version(),
36+
packages=find_packages(),
37+
install_requires=[],
38+
author="Darius Stefan",
39+
author_email="darius.stefan@opensips.org",
40+
description="OpenSIPS Python Packages",
41+
long_description=Path("README.md").read_text(encoding="utf-8"),
42+
long_description_content_type="text/markdown",
43+
url="https://github.com/OpenSIPS/python-opensips",
44+
classifiers=[
45+
"Programming Language :: Python :: 3",
46+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
47+
"Operating System :: OS Independent",
48+
],
49+
entry_points={
50+
"console_scripts": [
51+
"opensips-mi = opensips.mi.__main__:main",
52+
"opensips-event = opensips.event.__main__:main",
53+
]
54+
},
55+
python_requires=">=3.6",
56+
)

0 commit comments

Comments
 (0)