From c39b4d21794ebc2afc819ac64bc12aefe6af3f75 Mon Sep 17 00:00:00 2001 From: Nex Date: Sun, 8 May 2022 15:15:00 +0200 Subject: [PATCH] Minimized setup.py and moved all possible to setup.cfg --- setup.cfg | 8 ++++++++ setup.py | 27 +-------------------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/setup.cfg b/setup.cfg index 001e572..faa6143 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,8 @@ name = mvt author = Claudio Guarnieri author_email = nex@nex.sx description = Mobile Verification Toolkit +long_description = file: README.md +long_description_content_type = text/markdown url = https://github.com/mvt-project/mvt keywords = security, mobile, forensics, malware license = MVT v1.1 @@ -13,6 +15,9 @@ classifiers = Programming Language :: Python [options] +packages = find: +package_dir = = mvt +include_package_data = True python_requires = >= 3.8 install_requires = click >=8.0.3 @@ -28,6 +33,9 @@ install_requires = libusb1 >=2.0.1 cryptography >=36.0.1 +[options.packages.find] +where = mvt + [options.entry_points] console_scripts = mvt-ios = mvt.ios:cli diff --git a/setup.py b/setup.py index 9624806..514895b 100755 --- a/setup.py +++ b/setup.py @@ -3,35 +3,10 @@ # Use of this software is governed by the MVT License 1.1 that can be found at # https://license.mvt.re/1.1/ -import os - -from setuptools import find_packages, setup +from setuptools import setup from mvt.common.version import MVT_VERSION -this_directory = os.path.abspath(os.path.dirname(__file__)) -readme_path = os.path.join(this_directory, "README.md") -with open(readme_path, encoding="utf-8") as handle: - long_description = handle.read() - - -def get_package_data(package): - walk = [(dirpath.replace(package + os.sep, "", 1), filenames) - for dirpath, dirnames, filenames in os.walk(package) - if not os.path.exists(os.path.join(dirpath, "__init__.py"))] - - filepaths = [] - for base, filenames in walk: - filepaths.extend([os.path.join(base, filename) - for filename in filenames]) - return {package: filepaths} - - setup( version=MVT_VERSION, - long_description=long_description, - long_description_content_type="text/markdown", - packages=find_packages(), - package_data=get_package_data("mvt"), - include_package_data=True, )