mvt/setup.py

57 lines
1.5 KiB
Python
Raw Normal View History

2021-07-16 06:05:01 +00:00
# Mobile Verification Toolkit (MVT)
2022-01-30 19:15:01 +00:00
# Copyright (c) 2021-2022 The MVT Project Authors.
# Use of this software is governed by the MVT License 1.1 that can be found at
# https://license.mvt.re/1.1/
2021-07-16 06:05:01 +00:00
import os
2021-07-30 09:40:09 +00:00
from setuptools import find_packages, setup
2021-07-16 06:05:01 +00:00
2021-08-26 10:36:37 +00:00
from mvt.common.version import MVT_VERSION
2021-07-16 06:05:01 +00:00
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()
requires = (
# Base dependencies:
2021-10-18 10:57:27 +00:00
"click>=8.0.3",
"rich>=10.12.0",
2021-07-25 10:03:45 +00:00
"tld>=0.12.6",
2021-10-18 10:57:27 +00:00
"tqdm>=4.62.3",
2021-07-25 10:03:45 +00:00
"requests>=2.26.0",
2021-10-18 10:57:27 +00:00
"simplejson>=3.17.5",
2021-08-26 10:47:46 +00:00
"packaging>=21.0",
"appdirs>=1.4.4",
2021-07-16 06:05:01 +00:00
# iOS dependencies:
"iOSbackup>=0.9.921",
2021-07-16 06:05:01 +00:00
# Android dependencies:
2021-10-23 11:51:33 +00:00
"adb-shell>=0.4.2",
2021-10-18 10:57:27 +00:00
"libusb1>=2.0.1",
"cryptography>=36.0.1"
2021-07-16 06:05:01 +00:00
)
2021-11-19 14:27:51 +00:00
2021-07-16 06:05:01 +00:00
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}
2021-11-19 14:27:51 +00:00
2021-07-16 06:05:01 +00:00
setup(
2021-08-26 10:36:37 +00:00
version=MVT_VERSION,
2021-07-16 06:05:01 +00:00
long_description=long_description,
2021-07-18 14:31:25 +00:00
long_description_content_type="text/markdown",
2021-07-16 06:05:01 +00:00
install_requires=requires,
packages=find_packages(),
package_data=get_package_data("mvt"),
include_package_data=True,
)