2018-04-11 21:49:41 +00:00
|
|
|
|
# -*- coding: UTF−8 -*-
|
2017-07-05 21:36:10 +00:00
|
|
|
|
|
2021-05-07 15:47:04 +00:00
|
|
|
|
import os
|
2021-05-18 19:26:47 +00:00
|
|
|
|
import sys
|
2017-07-05 21:36:10 +00:00
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
2021-05-10 14:14:11 +00:00
|
|
|
|
# Pycrate Version
|
2022-03-16 17:29:28 +00:00
|
|
|
|
VERSION = "0.5.4"
|
2021-05-10 14:14:11 +00:00
|
|
|
|
|
|
|
|
|
|
2021-05-18 19:26:47 +00:00
|
|
|
|
# get dependencies according to the Python version
|
|
|
|
|
if sys.version_info[0] == 2:
|
|
|
|
|
# Python2 requires enum34
|
|
|
|
|
install_reqs = ['enum34']
|
|
|
|
|
else:
|
|
|
|
|
install_reqs = []
|
|
|
|
|
|
|
|
|
|
|
2021-05-10 14:14:11 +00:00
|
|
|
|
# get long description from the README.md
|
2021-05-10 09:35:01 +00:00
|
|
|
|
with open(os.path.join(os.path.dirname(__file__), "README.md")) as fd:
|
|
|
|
|
long_description = fd.read()
|
2021-05-07 15:47:04 +00:00
|
|
|
|
|
|
|
|
|
|
2017-07-05 21:36:10 +00:00
|
|
|
|
setup(
|
|
|
|
|
name="pycrate",
|
2021-05-10 14:14:11 +00:00
|
|
|
|
version=VERSION,
|
2017-07-05 21:36:10 +00:00
|
|
|
|
|
|
|
|
|
#packages=find_packages(),
|
2021-05-10 14:14:11 +00:00
|
|
|
|
packages=[
|
|
|
|
|
"pycrate_core",
|
|
|
|
|
"pycrate_ether",
|
|
|
|
|
"pycrate_media",
|
|
|
|
|
"pycrate_asn1c",
|
|
|
|
|
"pycrate_asn1dir",
|
|
|
|
|
"pycrate_asn1rt",
|
|
|
|
|
"pycrate_csn1",
|
|
|
|
|
"pycrate_csn1dir",
|
|
|
|
|
"pycrate_mobile",
|
|
|
|
|
"pycrate_diameter",
|
|
|
|
|
"pycrate_corenet",
|
|
|
|
|
"pycrate_sys",
|
|
|
|
|
"pycrate_crypto",
|
2022-02-04 13:43:10 +00:00
|
|
|
|
"pycrate_osmo",
|
2021-05-10 14:14:11 +00:00
|
|
|
|
],
|
|
|
|
|
|
2017-07-05 21:36:10 +00:00
|
|
|
|
test_suite="test.test_pycrate",
|
|
|
|
|
|
2021-05-10 14:14:11 +00:00
|
|
|
|
scripts=[
|
|
|
|
|
"tools/pycrate_asn1compile.py",
|
|
|
|
|
"tools/pycrate_berdecode.py",
|
|
|
|
|
"tools/pycrate_showmedia.py",
|
|
|
|
|
"tools/pycrate_shownas.py",
|
2022-03-16 17:16:19 +00:00
|
|
|
|
"tools/pycrate_gtp_type_info.py",
|
2021-05-10 14:14:11 +00:00
|
|
|
|
"tools/pycrate_map_op_info.py",
|
2022-02-04 15:06:28 +00:00
|
|
|
|
"tools/pycrate_extnas_demo.py",
|
2021-05-10 14:14:11 +00:00
|
|
|
|
],
|
2017-07-05 21:36:10 +00:00
|
|
|
|
|
2021-05-18 19:26:47 +00:00
|
|
|
|
# potential dependencies
|
|
|
|
|
install_requires=install_reqs,
|
2017-07-05 21:36:10 +00:00
|
|
|
|
|
2019-08-01 15:04:33 +00:00
|
|
|
|
# optional dependencies
|
2019-08-01 15:08:17 +00:00
|
|
|
|
extras_require={
|
2019-08-01 15:04:33 +00:00
|
|
|
|
"NASLTE" : ["CryptoMobile"],
|
2021-05-10 09:35:01 +00:00
|
|
|
|
"NAS5G" : ["CryptoMobile"],
|
2019-08-01 15:04:33 +00:00
|
|
|
|
"corenet" : ["pysctp", "CryptoMobile"],
|
|
|
|
|
"diameter_dict" : ["lxml"],
|
2022-01-14 08:46:20 +00:00
|
|
|
|
"SEDebugMux": ["crcmod"],
|
2019-08-01 15:04:33 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
# for pycrate_asn1dir and pycrate_csn1dir:
|
2021-05-10 14:14:11 +00:00
|
|
|
|
# .asn, .csn, .txt and .json files from asn1dir and csn1dir are not required to be installed
|
2017-07-05 21:36:10 +00:00
|
|
|
|
# only compiled .py modules are installed by default
|
2019-08-01 15:04:33 +00:00
|
|
|
|
# for pycrate_diameter:
|
2021-05-10 14:14:11 +00:00
|
|
|
|
# .xml files are converted to Python dicts and may be updated from time to time
|
2019-08-01 15:04:33 +00:00
|
|
|
|
# for pycrate_corenet:
|
|
|
|
|
# the AuC.db file is the mobile subscriber authentication database
|
|
|
|
|
# containing Ki and is required at runtime when using corenet
|
2017-07-05 21:36:10 +00:00
|
|
|
|
package_data={
|
2019-08-01 15:04:33 +00:00
|
|
|
|
#"pycrate_asn1dir" : ["*.asn", "*.json"],
|
|
|
|
|
#"pycrate_csn1dir" : ["*.csn"],
|
2020-12-10 14:28:44 +00:00
|
|
|
|
#"pycrate_diameter" : ["*.xml"],
|
2019-08-01 15:04:33 +00:00
|
|
|
|
"pycrate_corenet" : ["AuC.db"],
|
2017-07-05 21:36:10 +00:00
|
|
|
|
},
|
|
|
|
|
#include_package_data=False,
|
|
|
|
|
|
|
|
|
|
author="Benoit Michau",
|
|
|
|
|
author_email="michau.benoit@gmail.com",
|
|
|
|
|
description="A software suite to handle various data formats",
|
2021-05-07 15:47:04 +00:00
|
|
|
|
long_description=long_description,
|
2021-05-06 15:45:17 +00:00
|
|
|
|
long_description_content_type="text/markdown",
|
2019-08-01 15:04:33 +00:00
|
|
|
|
url="https://github.com/P1sec/pycrate/",
|
2022-03-16 17:29:28 +00:00
|
|
|
|
keywords="protocol format ASN.1 CSN.1 compiler encoder decoder mobile core network Diameter NAS S1AP NGAP TCAP MAP GTP PFCP SCCP ISUP",
|
2018-04-15 19:47:21 +00:00
|
|
|
|
license="LGPL v2.1+",
|
2017-07-05 21:36:10 +00:00
|
|
|
|
)
|