2017-04-25 16:45:34 +01:00
|
|
|
"""
|
|
|
|
Defines how CORE will be built for installation.
|
|
|
|
"""
|
|
|
|
|
2018-01-10 19:03:20 +00:00
|
|
|
import glob
|
|
|
|
import os
|
2018-01-04 22:33:25 +00:00
|
|
|
|
2019-06-05 05:49:44 +01:00
|
|
|
from setuptools import find_packages, setup
|
2018-01-04 22:33:25 +00:00
|
|
|
|
2018-01-11 19:21:56 +00:00
|
|
|
_CORE_DIR = "/etc/core"
|
2018-03-13 23:20:50 +00:00
|
|
|
_MAN_DIR = "share/man/man1"
|
|
|
|
_EXAMPLES_DIR = "share/core"
|
2018-01-11 19:21:56 +00:00
|
|
|
|
|
|
|
|
2018-01-10 19:03:20 +00:00
|
|
|
def recursive_files(data_path, files_path):
|
2018-10-15 16:33:06 +01:00
|
|
|
all_files = []
|
|
|
|
for path, _directories, filenames in os.walk(files_path):
|
2018-01-10 19:03:20 +00:00
|
|
|
directory = os.path.join(data_path, path)
|
|
|
|
files = []
|
|
|
|
for filename in filenames:
|
|
|
|
files.append(os.path.join(path, filename))
|
2018-10-15 16:33:06 +01:00
|
|
|
all_files.append((directory, files))
|
|
|
|
return all_files
|
2018-01-10 19:03:20 +00:00
|
|
|
|
|
|
|
|
2018-01-11 19:21:56 +00:00
|
|
|
data_files = [
|
2019-09-11 17:37:06 +01:00
|
|
|
(_CORE_DIR, glob.glob("data/*")),
|
|
|
|
(_MAN_DIR, glob.glob("../man/**.1")),
|
2018-01-11 19:21:56 +00:00
|
|
|
]
|
2018-03-13 23:20:50 +00:00
|
|
|
data_files.extend(recursive_files(_EXAMPLES_DIR, "examples"))
|
2018-01-11 19:21:56 +00:00
|
|
|
|
2017-12-19 17:43:19 +00:00
|
|
|
setup(
|
|
|
|
name="core",
|
2019-03-25 17:44:47 +00:00
|
|
|
version="@PACKAGE_VERSION@",
|
2018-01-03 21:45:19 +00:00
|
|
|
packages=find_packages(),
|
2017-12-19 17:43:19 +00:00
|
|
|
install_requires=[
|
2019-05-06 05:49:42 +01:00
|
|
|
"configparser",
|
2019-05-06 00:19:12 +01:00
|
|
|
"future",
|
2019-06-04 23:41:15 +01:00
|
|
|
"grpcio",
|
2019-09-11 17:37:06 +01:00
|
|
|
"lxml",
|
|
|
|
"protobuf",
|
2017-12-19 17:43:19 +00:00
|
|
|
],
|
2019-09-11 17:37:06 +01:00
|
|
|
extra_require={
|
|
|
|
":python_version<'3.2'": ["futures"],
|
|
|
|
":python_version<'3.4'": ["enum34"],
|
|
|
|
},
|
2017-12-19 17:43:19 +00:00
|
|
|
tests_require=[
|
|
|
|
"pytest",
|
2017-12-22 00:19:12 +00:00
|
|
|
"mock",
|
|
|
|
],
|
2018-01-11 19:21:56 +00:00
|
|
|
data_files=data_files,
|
2018-03-15 18:30:11 +00:00
|
|
|
scripts=glob.glob("scripts/*"),
|
2017-12-19 17:43:19 +00:00
|
|
|
description="Python components of CORE",
|
2019-03-31 05:19:00 +01:00
|
|
|
url="https://github.com/coreemu/core",
|
2017-12-19 17:43:19 +00:00
|
|
|
author="Boeing Research & Technology",
|
|
|
|
license="BSD",
|
2018-01-04 22:33:25 +00:00
|
|
|
long_description="Python scripts and modules for building virtual emulated networks.",
|
2017-12-19 17:43:19 +00:00
|
|
|
)
|