solve the dep issue with enum34 in Py2, and make the cicd happy again

This commit is contained in:
p1-bmu 2021-05-18 21:26:47 +02:00
parent 7f3647e4bf
commit cc319e47a9
3 changed files with 19 additions and 6 deletions

View File

@ -49,21 +49,23 @@ Dependencies
Currently none. Only the Python builtins and few internal modules of Python
(e.g. os, system, re, struct, datetime) are required for most of the features.
The json internal module is required for supporting the JSON API.
If you want to run pycrate in Python2 (which is bad !), you will however need to
install the [enum34](https://pypi.org/project/enum34/) package.
The _pycrate\_ether/SCTP_ module can optionally use the external
[crc32c](https://pypi.org/project/crc32c/) module from ICRAR.
The _pycrate\_mobile/TS24301\_EMM_ and _pycrate\_mobile/TS24501\_FGMM_ modules use
[CryptoMobile](https://github.com/p1sec/CryptoMobile) as optional dependency to
cipher / decipher LTE and 5G NAS messages.
encrypt and decrypt LTE and 5G NAS messages.
The _pycrate\_corenet_ part requires also [pysctp](https://pypi.org/project/pysctp/)
and [CryptoMobile](https://github.com/p1sec/CryptoMobile) to run.
The _pycrate\_diameter/parse\_iana\_diameter\_xml.py_ file uses
[lxml](https://pypi.org/project/lxml/) to translate xml files from IANA to Python
dictionnaries ; this is however not required for standard runtime.
The _pycrate\_corenet_ part requires [pysctp](https://pypi.org/project/pysctp/)
and [CryptoMobile](https://github.com/p1sec/CryptoMobile) to run.
Automatic installation
----------------------

View File

@ -10,6 +10,8 @@ platform =
linux: linux
macos: darwin
windows: win32
deps =
py27: enum34
commands = python -m unittest --verbose test.test_pycrate
[gh-actions]

View File

@ -1,12 +1,21 @@
# -*- coding: UTF8 -*-
import os
import sys
from setuptools import setup, find_packages
# Pycrate Version
VERSION = "0.4.1"
# get dependencies according to the Python version
if sys.version_info[0] == 2:
# Python2 requires enum34
install_reqs = ['enum34']
else:
install_reqs = []
# get long description from the README.md
with open(os.path.join(os.path.dirname(__file__), "README.md")) as fd:
long_description = fd.read()
@ -43,8 +52,8 @@ setup(
"tools/pycrate_map_op_info.py",
],
# no mandatory dependency
install_requires=[],
# potential dependencies
install_requires=install_reqs,
# optional dependencies
extras_require={