|
| 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