Thu, Jun 13, 2019 at 09:45:47AM CEST, jurbanov(a)redhat.com wrote:
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
deleted obsolete code, referencing lnst-ctl, recipes, xslt results and
test tools
added install_requires with python dependencies
Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>
This is just an after-push comment that should be fixed at some point.
In the patch there are still some lnst-ctl* references, what's the point
of keeping them?
-Jan
>---
> setup.py | 151 +++++++++++++++----------------------------------------
> 1 file changed, 41 insertions(+), 110 deletions(-)
>
>diff --git a/setup.py b/setup.py
>index 2a6a491..ad8bfa7 100755
>--- a/setup.py
>+++ b/setup.py
>@@ -1,30 +1,26 @@
> #!/usr/bin/env python3
>+
> """
> Install script for lnst
>
>-This script will install both lnst controller and slave
>-to your system. To install LNST, execute it as follows:
>+This script will install LNST to your system.
>+To install LNST, execute it as follows:
>
>- ./setup.py install
>+ pip3 install .
>
> To install lnst to a different root use:
>
>- .setup.py install --root=<path>
>-
>-"""
>+ pip3 install --prefix <path> .
>
>-__author__ = """
>-rpazdera(a)redhat.com (Radek Pazdera)
> """
>
>-import sys
> import re
> import gzip
>-import os
> from time import gmtime, strftime
> from setuptools import setup, find_packages
> from lnst.Common.Version import lnst_version
>
>+
> def process_template(template_path, values):
> template_name_re = "\.in$"
> if not re.search(template_name_re, template_path):
>@@ -40,6 +36,7 @@ def process_template(template_path, values):
> f.close()
> t.close()
>
>+
> def gzip_file(path):
> src = open(path, "rb")
> dst = gzip.open(path + ".gz", "wb")
>@@ -47,13 +44,12 @@ def gzip_file(path):
> dst.close()
> src.close()
>
>+
> # Various paths
> CONF_DIR = "/etc/"
> BASH_COMP_DIR = CONF_DIR + "bash_completion.d/"
> MAN_DIR = "/usr/share/man/man1/"
>
>-CTL_MODULES_LOCATIONS = "/usr/share/lnst/test_modules/"
>-CTL_TOOLS_LOCATIONS = "/usr/share/lnst/test_tools/"
> CTL_RESOURCE_DIR = "/usr/share/lnst/"
> CTL_LOGS_DIR = "~/.lnst/logs/"
>
>@@ -62,26 +58,22 @@ SLAVE_CACHE_DIR = "/var/cache/lnst"
>
> # Process templated files
> TEMPLATES_VALUES = {
>-"conf_dir": CONF_DIR,
>-"man_dir": MAN_DIR,
>+ "conf_dir": CONF_DIR,
>+ "man_dir": MAN_DIR,
>
>-"ctl_modules_locations": CTL_MODULES_LOCATIONS,
>-"ctl_tools_locations": CTL_TOOLS_LOCATIONS,
>-"ctl_resource_dir": CTL_RESOURCE_DIR,
>-"ctl_logs_dir": CTL_LOGS_DIR,
>+ "ctl_resource_dir": CTL_RESOURCE_DIR,
>+ "ctl_logs_dir": CTL_LOGS_DIR,
>
>-"slave_logs_dir": SLAVE_LOGS_DIR,
>-"slave_cache_dir": SLAVE_CACHE_DIR,
>+ "slave_logs_dir": SLAVE_LOGS_DIR,
>+ "slave_cache_dir": SLAVE_CACHE_DIR,
>
>-"date": strftime("%Y-%m-%d", gmtime())
>+ "date": strftime("%Y-%m-%d", gmtime())
> }
>
> TEMPLATES = [
>-"install/lnst-ctl.conf.in",
>-"install/lnst-slave.conf.in",
>-"install/lnst-ctl.1.in",
>-"install/lnst-slave.1.in",
>-"install/lnst-pool-wizard.1.in"
>+ "install/lnst-ctl.conf.in",
>+ "install/lnst-slave.conf.in",
>+ "install/lnst-slave.1.in",
> ]
>
> for template in TEMPLATES:
>@@ -89,12 +81,9 @@ for template in TEMPLATES:
> # ---
>
> # Pack man pages
>-gzip_file("install/lnst-ctl.1")
> gzip_file("install/lnst-slave.1")
>-gzip_file("install/lnst-pool-wizard.1")
> # ---
>
>-
> LONG_DESC = """LNST
>
> Linux Network Stack Test is a tool that supports development and execution
>@@ -104,92 +93,34 @@ For detailed description of the architecture of LNST please refer
to
> project website <
https://fedorahosted.org/lnst>.
> """
>
>-SCRIPTS = ["lnst-ctl", "lnst-slave",
"lnst-pool-wizard"]
>-
>-RECIPE_FILES = []
>-for dirpath, dirnames, files in os.walk("recipes/"):
>- if len(files) > 0:
>- RECIPE_FILES.append((CTL_RESOURCE_DIR + dirpath + "/",
>- [dirpath + "/" + f for f in files]))
>-
>-TEST_MODULES = [
>- (CTL_MODULES_LOCATIONS,
>- ["test_modules/DummyFailing.py",
>- "test_modules/Icmp6Ping.py",
>- "test_modules/IcmpPing.py",
>- "test_modules/Iperf.py",
>- "test_modules/Multicast.py",
>- "test_modules/NetCat.py",
>- "test_modules/Netperf.py",
>- "test_modules/PacketAssert.py",
>- "test_modules/PktCounter.py",
>- "test_modules/PktgenTx.py",
>- "test_modules/LinkNeg.py",
>- "test_modules/Custom.py"]
>- )
>-]
>+SCRIPTS = ["lnst-slave"]
>
>-MULTICAST_TEST_TOOLS = [
>- (CTL_TOOLS_LOCATIONS + "multicast",
>- ["test_tools/multicast/igmp_utils.h",
>- "test_tools/multicast/lnst-setup.sh",
>- "test_tools/multicast/Makefile",
>- "test_tools/multicast/multicast_utils.h",
>- "test_tools/multicast/parameters_igmp.h",
>- "test_tools/multicast/parameters_multicast.h",
>- "test_tools/multicast/README",
>- "test_tools/multicast/sockopt_utils.h"]),
>- (CTL_TOOLS_LOCATIONS + "multicast/client",
>- ["test_tools/multicast/client/send_igmp_query.c",
>- "test_tools/multicast/client/send_simple.c"]),
>- (CTL_TOOLS_LOCATIONS + "multicast/offline",
>- ["test_tools/multicast/offline/max_groups.c",
>- "test_tools/multicast/offline/sockopt_block_source.c",
>- "test_tools/multicast/offline/sockopt_if.c",
>- "test_tools/multicast/offline/sockopt_loop.c",
>- "test_tools/multicast/offline/sockopt_membership.c",
>- "test_tools/multicast/offline/sockopt_source_membership.c",
>- "test_tools/multicast/offline/sockopt_ttl.c"]),
>- (CTL_TOOLS_LOCATIONS + "multicast/server",
>- ["test_tools/multicast/server/recv_block_source.c",
>- "test_tools/multicast/server/recv_membership.c",
>- "test_tools/multicast/server/recv_simple.c",
>- "test_tools/multicast/server/recv_source_membership.c"]),
>- (CTL_TOOLS_LOCATIONS + "tcp_conn",
>- ["test_tools/tcp_conn/lnst-setup.sh",
>- "test_tools/tcp_conn/Makefile",
>- "test_tools/tcp_conn/tcp_connect.c",
>- "test_tools/tcp_conn/tcp_listen.c"])
>-]
>-
>-MAN_PAGES = [(MAN_DIR, ["install/lnst-ctl.1.gz",
"install/lnst-slave.1.gz",
>- "install/lnst-pool-wizard.1.gz"])]
>+MAN_PAGES = [(MAN_DIR, ["install/lnst-slave.1.gz"])]
>
> CONFIG = [(CONF_DIR, ["install/lnst-ctl.conf",
"install/lnst-slave.conf"])]
>
>-BASH_COMP = [(BASH_COMP_DIR, ["install/lnst-ctl.bash",
>- "install/lnst-slave.bash",
>- "install/lnst-pool-wizard.bash"])]
>-
>-SCHEMAS = [(CTL_RESOURCE_DIR, ["schema-recipe.rng",
"schema-sm.rng"])]
>+BASH_COMP = [(BASH_COMP_DIR, ["install/lnst-slave.bash"])]
>
>-RESULT_XSLT_DATA = [(CTL_RESOURCE_DIR + "result_xslt/",
>- ["result_xslt/" + f for f in
os.listdir("result_xslt")])]
>+SCHEMAS = [(CTL_RESOURCE_DIR, ["schema-sm.rng"])]
>
>-DATA_FILES = CONFIG + TEST_MODULES + MULTICAST_TEST_TOOLS + MAN_PAGES + \
>- SCHEMAS + BASH_COMP + RECIPE_FILES + RESULT_XSLT_DATA
>+DATA_FILES = CONFIG + MAN_PAGES + SCHEMAS + BASH_COMP
>
> setup(name="lnst",
>- version=lnst_version.version,
>- description="Linux Network Stack Test",
>- author="LNST Team",
>- author_email="lnst-developers(a)lists.fedorahosted.org",
>- maintainer="Jiri Pirko",
>- maintainer_email="jiri(a)resnulli.us",
>- url="http://lnst-project.org",
>- long_description=LONG_DESC,
>- platforms=["linux"],
>- license=["GNU GPLv2"],
>- packages=find_packages(),
>- scripts=SCRIPTS,
>- data_files=DATA_FILES)
>+ version=lnst_version.version,
>+ description="Linux Network Stack Test",
>+ author="LNST Team",
>+ author_email="lnst-developers(a)lists.fedorahosted.org",
>+ maintainer="Ondrej Lichtner",
>+ maintainer_email="olichtne(a)redhat.com",
>+ url="http://lnst-project.org",
>+ long_description=LONG_DESC,
>+ platforms=["linux"],
>+ license=["GNU GPLv2"],
>+ packages=find_packages(),
>+ install_requires=[
>+ 'pyyaml',
>+ 'lxml',
>+ 'pyroute2',
>+ 'libvirt-python'],
>+ scripts=SCRIPTS,
>+ data_files=DATA_FILES)
>--
>2.21.0
>_______________________________________________
>LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
>To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
>Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
>List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...