initial cleanup passing over all makefiles and configure.ac

This commit is contained in:
Blake J. Harnden 2018-03-13 16:20:50 -07:00
parent ac705f4908
commit 6210e70c80
28 changed files with 328 additions and 641 deletions

View file

@ -7,17 +7,12 @@
# Makefile for building corens3 components.
#
SETUPPY = setup.py
SETUPPYFLAGS = -v
SETUPPY = setup.py
SETUPPYFLAGS = -v
EXAMPLE_FILES = \
examples/ns3lte.py \
examples/ns3wifi.py \
examples/ns3wifirandomwalk.py \
examples/ns3wimax.py
coreexampledir = $(datadir)/core/examples/corens3
dist_coreexample_SCRIPTS= $(EXAMPLE_FILES)
#EXAMPLE_FILES := $(wildcard examples/*)
#coreexampledir = $(datadir)/core/examples/corens3
#dist_coreexample_SCRIPTS = $(EXAMPLE_FILES)
# Python package build
noinst_SCRIPTS = build
@ -26,34 +21,30 @@ build:
# Python package install
install-exec-hook:
$(MKDIR_P) ${DESTDIR}/${pythondir}
$(MKDIR_P) ${DESTDIR}/${pyexecdir}
PYTHONPATH=${DESTDIR}/${pythondir} $(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install \
--prefix=${DESTDIR}/${pyprefix} \
--install-purelib=${DESTDIR}/${pythondir} \
--install-platlib=${DESTDIR}/${pyexecdir} \
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install \
--root=/$(DESTDIR) \
--prefix=$(prefix) \
--install-lib=$(pythondir) \
--single-version-externally-managed \
--no-compile
# Python package uninstall
uninstall-hook:
rm -f ${pythondir}/corens3_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info
rm -rf ${pythondir}/corens3
rmdir -p $(coreexampledir) || true
rm -rf core_ns3.egg-info
rm -rf $(DESTDIR)/$(pythondir)/core_ns3-$(PACKAGE_VERSION)-py$(PYTHON_VERSION).egg-info
rm -rf $(DESTDIR)/$(pythondir)/corens3
rm -rf $(DESTDIR)/$(datadir)/corens3
# Python package cleanup
clean-local:
-rm -rf build
# Python RPM package
rpm:
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) bdist_rpm
# because we include entire directories with EXTRA_DIST, we need to clean up
# the source control files
dist-hook:
rm -rf `find $(distdir)/ -name .svn` `find $(distdir)/ -name '*.pyc'`
rm -rf `find $(distdir)/ -name '*.pyc'`
DISTCLEANFILES = Makefile.in *.pyc corens3/*.pyc MANIFEST
DISTCLEANFILES = Makefile.in *.pyc corens3/*.pyc MANIFEST
# files to include with distribution tarball
EXTRA_DIST = LICENSE $(SETUPPY) corens3
EXTRA_DIST = LICENSE $(SETUPPY) corens3

View file

@ -1 +0,0 @@
constants.py

View file

@ -1,18 +0,0 @@
# Constants created by autoconf ./configure script
COREDPY_VERSION = "@COREDPY_VERSION@"
CORE_STATE_DIR = "@CORE_STATE_DIR@"
CORE_CONF_DIR = "@CORE_CONF_DIR@"
CORE_DATA_DIR = "@CORE_DATA_DIR@"
CORE_LIB_DIR = "@CORE_LIB_DIR@"
CORE_SBIN_DIR = "@SBINDIR@"
BRCTL_BIN = "@brctl_path@/brctl"
IP_BIN = "@ip_path@/ip"
TC_BIN = "@tc_path@/tc"
EBTABLES_BIN = "@ebtables_path@/ebtables"
IFCONFIG_BIN = "@ifconfig_path@/ifconfig"
NGCTL_BIN = "@ngctl_path@/ngctl"
VIMAGE_BIN = "@vimage_path@/vimage"
QUAGGA_STATE_DIR = "@CORE_STATE_DIR@/run/quagga"
MOUNT_BIN = "@mount_path@/mount"
UMOUNT_BIN = "@umount_path@/umount"

View file

@ -1,11 +1,16 @@
import glob
from setuptools import setup
_EXAMPLES_DIR = "share/corens3/examples"
setup(
name="core-ns3",
version="5.1",
packages=[
"corens3",
],
data_files=[(_EXAMPLES_DIR, glob.glob("examples/*"))],
description="Python ns-3 components of CORE",
url="http://www.nrl.navy.mil/itd/ncs/products/core",
author="Boeing Research & Technology",