2017-04-25 08:45:34 -07:00
|
|
|
"""
|
|
|
|
Defines how CORE will be built for installation.
|
|
|
|
"""
|
|
|
|
|
2018-01-10 11:03:20 -08:00
|
|
|
import glob
|
|
|
|
import os
|
2018-01-04 14:33:25 -08:00
|
|
|
|
2019-06-04 21:49:44 -07:00
|
|
|
from setuptools import find_packages, setup
|
2018-01-04 14:33:25 -08:00
|
|
|
|
2018-01-11 11:21:56 -08:00
|
|
|
_CORE_DIR = "/etc/core"
|
2018-03-13 16:20:50 -07:00
|
|
|
_MAN_DIR = "share/man/man1"
|
|
|
|
_EXAMPLES_DIR = "share/core"
|
2018-01-11 11:21:56 -08:00
|
|
|
|
|
|
|
|
2018-01-10 11:03:20 -08:00
|
|
|
def recursive_files(data_path, files_path):
|
2018-10-15 08:33:06 -07:00
|
|
|
all_files = []
|
|
|
|
for path, _directories, filenames in os.walk(files_path):
|
2018-01-10 11:03:20 -08:00
|
|
|
directory = os.path.join(data_path, path)
|
|
|
|
files = []
|
|
|
|
for filename in filenames:
|
|
|
|
files.append(os.path.join(path, filename))
|
2018-10-15 08:33:06 -07:00
|
|
|
all_files.append((directory, files))
|
|
|
|
return all_files
|
2018-01-10 11:03:20 -08:00
|
|
|
|
|
|
|
|
2018-01-11 11:21:56 -08:00
|
|
|
data_files = [
|
2019-09-11 09:37:06 -07:00
|
|
|
(_CORE_DIR, glob.glob("data/*")),
|
|
|
|
(_MAN_DIR, glob.glob("../man/**.1")),
|
2018-01-11 11:21:56 -08:00
|
|
|
]
|
2018-03-13 16:20:50 -07:00
|
|
|
data_files.extend(recursive_files(_EXAMPLES_DIR, "examples"))
|
2018-01-11 11:21:56 -08:00
|
|
|
|
2017-12-19 09:43:19 -08:00
|
|
|
setup(
|
|
|
|
name="core",
|
2019-03-25 10:44:47 -07:00
|
|
|
version="@PACKAGE_VERSION@",
|
2018-01-03 13:45:19 -08:00
|
|
|
packages=find_packages(),
|
2017-12-19 09:43:19 -08:00
|
|
|
install_requires=[
|
2020-03-31 14:19:02 -07:00
|
|
|
'dataclasses;python_version=="3.6"',
|
2019-10-17 08:41:48 -07:00
|
|
|
"fabric",
|
2019-06-04 15:41:15 -07:00
|
|
|
"grpcio",
|
2019-10-17 08:41:48 -07:00
|
|
|
"invoke",
|
2019-09-11 09:37:06 -07:00
|
|
|
"lxml",
|
2020-01-24 17:12:14 -08:00
|
|
|
"mako",
|
2020-03-31 09:41:29 -07:00
|
|
|
"netaddr",
|
2019-12-19 09:30:21 -08:00
|
|
|
"pillow",
|
2019-09-11 09:37:06 -07:00
|
|
|
"protobuf",
|
2020-02-21 15:54:55 -08:00
|
|
|
"pyproj",
|
2019-12-19 09:30:21 -08:00
|
|
|
"pyyaml",
|
2017-12-19 09:43:19 -08:00
|
|
|
],
|
|
|
|
tests_require=[
|
|
|
|
"pytest",
|
2017-12-21 16:19:12 -08:00
|
|
|
],
|
2018-01-11 11:21:56 -08:00
|
|
|
data_files=data_files,
|
2018-03-15 11:30:11 -07:00
|
|
|
scripts=glob.glob("scripts/*"),
|
2019-12-19 21:29:10 -08:00
|
|
|
include_package_data=True,
|
2017-12-19 09:43:19 -08:00
|
|
|
description="Python components of CORE",
|
2019-03-30 21:19:00 -07:00
|
|
|
url="https://github.com/coreemu/core",
|
2017-12-19 09:43:19 -08:00
|
|
|
author="Boeing Research & Technology",
|
|
|
|
license="BSD",
|
2018-01-04 14:33:25 -08:00
|
|
|
long_description="Python scripts and modules for building virtual emulated networks.",
|
2017-12-19 09:43:19 -08:00
|
|
|
)
|