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
|
|
|
|
2018-03-13 16:20:50 -07:00
|
|
|
from setuptools import find_packages
|
|
|
|
from distutils.core import 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
|
|
|
|
|
|
|
|
|
|
|
def glob_files(glob_path):
|
|
|
|
return glob.glob(glob_path)
|
|
|
|
|
|
|
|
|
2018-01-11 11:21:56 -08:00
|
|
|
data_files = [
|
|
|
|
(_CORE_DIR, [
|
2018-03-07 15:47:14 -08:00
|
|
|
"data/core.conf",
|
2018-01-11 11:21:56 -08:00
|
|
|
"data/logging.conf",
|
|
|
|
]),
|
2018-07-31 12:57:30 -07:00
|
|
|
(_MAN_DIR, glob_files("../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=[
|
|
|
|
"enum34",
|
2018-07-03 09:50:14 -07:00
|
|
|
"lxml"
|
2017-12-19 09:43:19 -08:00
|
|
|
],
|
|
|
|
tests_require=[
|
|
|
|
"pytest",
|
2017-12-21 16:19:12 -08:00
|
|
|
"pytest-runner",
|
2017-12-19 09:43:19 -08:00
|
|
|
"pytest-cov",
|
2017-12-21 16:19:12 -08:00
|
|
|
"mock",
|
|
|
|
],
|
2018-01-11 11:21:56 -08:00
|
|
|
data_files=data_files,
|
2018-03-15 11:30:11 -07:00
|
|
|
scripts=glob.glob("scripts/*"),
|
2017-12-19 09:43:19 -08:00
|
|
|
description="Python components of CORE",
|
|
|
|
url="http://www.nrl.navy.mil/itd/ncs/products/core",
|
|
|
|
author="Boeing Research & Technology",
|
|
|
|
author_email="core-dev@nrl.navy.mil",
|
|
|
|
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
|
|
|
)
|