Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISP: fix requirements; enum not required for python 3.4+ #409

Closed
rolinh opened this issue Jan 22, 2019 · 1 comment
Closed

MISP: fix requirements; enum not required for python 3.4+ #409

rolinh opened this issue Jan 22, 2019 · 1 comment
Assignees
Labels
category:bug Issue is related to a bug scope:analyzer Issue is analyzer related
Milestone

Comments

@rolinh
Copy link

rolinh commented Jan 22, 2019

Request Type

Bug

Work Environment

Question Answer
OS version (server) N/A
OS version (client) N/A
Cortex Analyzer Name MISP
Cortex Analyzer Version 1.15.1
Cortex Version N/A
Browser type & version N/A

Description

PR #398 may fix an issue with Ubuntu 16.04 but it introduces another: enum is apparently in python standard library since v3.4 (check this link).

The added dependency causes issues when using (at least) python 3.6:

/opt/analyzers/MISP # pip3 install -r requirements.txt
Ignoring future: markers 'python_version <= "2.7"' don't match your environment
Requirement already satisfied: cortexutils in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (1.3.0)
Collecting pymisp (from -r requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/2d/69/0b24012a55d21b174df044abed612669c30615cde559f9389a22df9c3062/pymisp-2.4.99-py3-none-any.whl
Collecting enum (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/02/a0/32e1d5a21b703f600183e205aafc6773577e16429af5ad3c3f9b956b07ca/enum-0.4.7.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/usr/lib/python3.6/distutils/core.py", line 16, in <module>
        from distutils.dist import Distribution
      File "/usr/lib/python3.6/distutils/dist.py", line 9, in <module>
        import re
      File "/usr/lib/python3.6/re.py", line 142, in <module>
        class RegexFlag(enum.IntFlag):
    AttributeError: module 'enum' has no attribute 'IntFlag'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ljoxw_cm/enum/

Steps to Reproduce

Attempt to pip3 install -r requirements.txt for the MISP analyzer with Python 3.6.

Possible Solutions

My guess is that the enum package is only required for python < 3.4. Thus, the requirements.txt file can probably be modified for something like:

cortexutils
pymisp
enum;python_version<'3.4'
future;python_version<='2.7'

At the very least, I can confirm that enum is not required with python 3.6.

@rolinh rolinh changed the title MISP: fix requirements MISP: fix requirements; enum not required for python 3.4+ Jan 22, 2019
@3c7 3c7 added category:bug Issue is related to a bug scope:analyzer Issue is analyzer related labels Jan 22, 2019
@3c7
Copy link
Contributor

3c7 commented Jan 22, 2019

Thanks for reporting!

@3c7 3c7 added this to the 1.15.2 milestone Jan 22, 2019
@3c7 3c7 self-assigned this Jan 22, 2019
@3c7 3c7 closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug Issue is related to a bug scope:analyzer Issue is analyzer related
Projects
None yet
Development

No branches or pull requests

2 participants