diff options
author | Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com> | 2022-05-25 19:02:24 +0100 |
---|---|---|
committer | Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com> | 2022-06-03 02:58:09 +0100 |
commit | 72bc9e17ebbe4a4e55a7bdb2c47628cc12decb73 (patch) | |
tree | f7429262d51afb9a0caf1670e10a8e64a8f4578f /setup.py | |
parent | c2fb698e7c9179fa4737a1f84bafac5ee1b00e57 (diff) | |
download | libvirt-ci-72bc9e17ebbe4a4e55a7bdb2c47628cc12decb73.zip libvirt-ci-72bc9e17ebbe4a4e55a7bdb2c47628cc12decb73.tar.gz libvirt-ci-72bc9e17ebbe4a4e55a7bdb2c47628cc12decb73.tar.bz2 |
libvirt-ci: Move lcitool/ to the git root directory
This decreases the directory hierarchy by two levels to adopt
a Python project-like structure.
Signed-off-by: Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c4a6919 --- /dev/null +++ b/setup.py @@ -0,0 +1,53 @@ +import os + +from setuptools import setup, Command + + +def get_recursive_datafiles(directories): + """Getting data files recursively.""" + + paths = [] + for directory in directories: + for (path, _, filenames) in os.walk(directory): + for filename in filenames: + paths.append(os.path.join('..', path, filename)) + return paths + + +class CleanCommand(Command): + """Custom clean command to tidy up the project root.""" + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + os.system("rm -vrf ./build ./dist ./*.pyc ./*.egg-info") + + +setup( + name="lcitool", + version="0.1", + packages=["lcitool"], + scripts=["bin/lcitool"], + package_data={ + "lcitool": get_recursive_datafiles(["lcitool/etc", + "lcitool/configs/install", + "lcitool/cross", + "lcitool/ansible"]), + }, + author="libvirt team", + author_email="libvir-list@redhat.com", + description="libvirt CI guest management tool", + keywords="libvirt ci", + url="https://libvirt.org", + classifiers=[ + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)" + ], + cmdclass={ + "clean": CleanCommand, + } +) |