mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
d486dd0df0
This is a major update coming all at once from master-next branch master-next branch was started with --orphan option which is basically a new branch without history. The major changes are: - repackaging - cleanup the directory tree - rewritte setup.py to allow install from deb file or pypi (pip install) - add a Makefile to make things (like building a deb) easier - review all debian files Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
74 lines
2.0 KiB
Python
Executable File
74 lines
2.0 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
|
|
from setuptools import setup
|
|
from setuptools import find_packages
|
|
|
|
INSTALL_REQUIRES = [
|
|
'argcomplete',
|
|
'ipaddr',
|
|
]
|
|
|
|
DATA_FILES = [
|
|
('/etc/default/', ['etc/default/networking']),
|
|
('/etc/network/ifupdown2/', ['etc/network/ifupdown2/addons.conf']),
|
|
('/etc/network/ifupdown2/', ['etc/network/ifupdown2/ifupdown2.conf']),
|
|
]
|
|
|
|
SCRIPTS = []
|
|
|
|
ENTRY_POINTS = {}
|
|
|
|
|
|
def build_deb_package():
|
|
try:
|
|
return sys.argv[sys.argv.index('--root') + 1].endswith('/debian/ifupdown2')
|
|
except:
|
|
return False
|
|
|
|
|
|
if build_deb_package():
|
|
DATA_FILES.append(('/usr/share/ifupdown2/sbin/', ['ifupdown2/sbin/start-networking']))
|
|
else:
|
|
ENTRY_POINTS = {
|
|
'console_scripts': [
|
|
'ifup = ifupdown2.__main__:main',
|
|
'ifdown = ifupdown2.__main__:main',
|
|
'ifquery = ifupdown2.__main__:main',
|
|
'ifreload = ifupdown2.__main__:main',
|
|
],
|
|
}
|
|
|
|
setup(
|
|
author='Roopa Prabhu',
|
|
author_email='roopa@cumulusnetworks.com',
|
|
maintainer='Julien Fortin',
|
|
maintainer_email='julien@cumulusnetworks.com',
|
|
classifiers=[
|
|
'Development Status :: 5 - Production/Stable',
|
|
'Environment :: Console',
|
|
'Intended Audience :: System Administrators',
|
|
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
|
|
'Natural Language :: English',
|
|
'Operating System :: POSIX :: Linux',
|
|
'Programming Language :: Python :: 2',
|
|
'Programming Language :: Python :: 2.7',
|
|
'Topic :: System :: Networking',
|
|
'Topic :: System :: Systems Administration'
|
|
],
|
|
description='interface network manager',
|
|
install_requires=INSTALL_REQUIRES,
|
|
license='GNU General Public License v2',
|
|
keywords='ifupdown2',
|
|
name='ifupdown2',
|
|
packages=find_packages(),
|
|
url='https://github.com/CumulusNetworks/ifupdown2',
|
|
version='2.0.0',
|
|
data_files=DATA_FILES,
|
|
setup_requires=['setuptools'],
|
|
scripts=SCRIPTS,
|
|
entry_points=ENTRY_POINTS
|
|
)
|