2013-10-30 23:58:17 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2013-10-05 02:45:15 +03:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013 GNS3 Technologies Inc.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
import sys
|
2023-01-01 11:04:48 +02:00
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
import subprocess
|
|
|
|
|
2013-10-08 20:33:51 +03:00
|
|
|
from setuptools import setup, find_packages
|
2013-10-05 02:45:15 +03:00
|
|
|
from setuptools.command.test import test as TestCommand
|
|
|
|
|
2024-02-09 07:28:23 +02:00
|
|
|
# we only support Python 3 version >= 3.7
|
|
|
|
if len(sys.argv) >= 2 and sys.argv[1] == "install" and sys.version_info < (3, 7):
|
|
|
|
raise SystemExit("Python 3.7 or higher is required")
|
2013-10-05 02:45:15 +03:00
|
|
|
|
2015-06-09 18:29:01 +03:00
|
|
|
|
2014-08-09 14:05:31 +03:00
|
|
|
class PyTest(TestCommand):
|
2013-10-30 23:58:17 +02:00
|
|
|
|
2013-10-05 02:45:15 +03:00
|
|
|
def finalize_options(self):
|
|
|
|
TestCommand.finalize_options(self)
|
|
|
|
self.test_args = []
|
|
|
|
self.test_suite = True
|
2013-10-30 23:58:17 +02:00
|
|
|
|
2013-10-05 02:45:15 +03:00
|
|
|
def run_tests(self):
|
2015-01-20 14:24:00 +02:00
|
|
|
# import here, cause outside the eggs aren't loaded
|
2014-08-09 14:05:31 +03:00
|
|
|
import pytest
|
2015-05-09 01:33:06 +03:00
|
|
|
|
2014-08-09 14:05:31 +03:00
|
|
|
errcode = pytest.main(self.test_args)
|
2013-10-05 02:45:15 +03:00
|
|
|
sys.exit(errcode)
|
|
|
|
|
2020-06-26 12:38:21 +03:00
|
|
|
|
2016-01-03 23:09:01 +02:00
|
|
|
dependencies = open("requirements.txt", "r").read().splitlines()
|
2015-03-14 23:40:00 +02:00
|
|
|
|
2013-10-05 02:45:15 +03:00
|
|
|
setup(
|
2013-10-30 23:58:17 +02:00
|
|
|
name="gns3-server",
|
|
|
|
version=__import__("gns3server").__version__,
|
|
|
|
url="http://github.com/GNS3/gns3-server",
|
|
|
|
license="GNU General Public License v3 (GPLv3)",
|
2020-06-18 05:34:15 +03:00
|
|
|
tests_require=["pytest", "pytest-capturelog", "pytest-aiohttp"],
|
2014-08-09 14:05:31 +03:00
|
|
|
cmdclass={"test": PyTest},
|
2015-01-13 22:39:06 +02:00
|
|
|
description="GNS3 server",
|
2023-01-10 02:23:06 +02:00
|
|
|
long_description=open("README.md", "r").read(),
|
2023-02-01 03:56:02 +02:00
|
|
|
long_description_content_type="text/markdown",
|
2015-01-15 00:05:33 +02:00
|
|
|
install_requires=dependencies,
|
2013-10-30 23:58:17 +02:00
|
|
|
entry_points={
|
|
|
|
"console_scripts": [
|
|
|
|
"gns3server = gns3server.main:main",
|
2016-07-29 20:53:48 +03:00
|
|
|
"gns3vmnet = gns3server.utils.vmnet:main",
|
2016-11-05 06:10:05 +02:00
|
|
|
"gns3loopback = gns3server.utils.windows_loopback:main"
|
2014-05-28 15:26:20 +03:00
|
|
|
]
|
|
|
|
},
|
2021-07-12 20:04:30 +03:00
|
|
|
packages=find_packages(".", exclude=["docs", "tests*"]),
|
2016-06-29 18:55:28 +03:00
|
|
|
include_package_data=True,
|
2016-10-05 15:54:26 +03:00
|
|
|
zip_safe=False,
|
2013-10-30 23:58:17 +02:00
|
|
|
platforms="any",
|
2024-02-09 07:28:23 +02:00
|
|
|
python_requires='>=3.7',
|
2020-05-08 06:04:57 +03:00
|
|
|
setup_requires=["setuptools>=17.1"],
|
2013-10-30 23:58:17 +02:00
|
|
|
classifiers=[
|
2018-09-02 11:32:33 +03:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
2013-10-30 23:58:17 +02:00
|
|
|
"Environment :: Console",
|
|
|
|
"Intended Audience :: Information Technology",
|
|
|
|
"Topic :: System :: Networking",
|
|
|
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
2015-01-14 02:05:26 +02:00
|
|
|
"Natural Language :: English",
|
2018-09-02 11:32:33 +03:00
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
2013-10-30 23:58:17 +02:00
|
|
|
"Programming Language :: Python",
|
2020-06-24 06:10:31 +03:00
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
2019-11-11 06:44:31 +02:00
|
|
|
"Programming Language :: Python :: 3.8",
|
2021-05-16 11:14:13 +03:00
|
|
|
"Programming Language :: Python :: 3.9",
|
2021-08-15 08:39:48 +03:00
|
|
|
"Programming Language :: Python :: 3.10",
|
2022-10-30 13:04:54 +02:00
|
|
|
"Programming Language :: Python :: 3.11",
|
2023-10-09 09:54:47 +03:00
|
|
|
"Programming Language :: Python :: 3.12",
|
2013-10-30 23:58:17 +02:00
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
2014-05-28 15:26:20 +03:00
|
|
|
],
|
2013-10-05 02:45:15 +03:00
|
|
|
)
|