Open jaegeral opened 7 years ago
I generally use a virtual env for testing, it makes everything easier.
Can you try to do the following?
pip install -I -e .
I've had to do a couple of times
sudo pip3 install --upgrade .
sudo -u www-data misp-modules -s
to get modules working
the -s
option uses the modules listed in the __init__.py
. If you are developing new modules, I recommend to do pip install -e
:
-e, --editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.
misp@misp:/usr/local/src/misp-modules$ sudo -E -u www-data misp-modules -s
uwhois module not installed.
invalid syntax (__init__.py, line 2)
2016-12-01 14:43:59,027 - misp-modules - INFO - Launch MISP modules server from package.
2016-12-01 14:43:59,028 - misp-modules - INFO - Helper loaded cache
2016-12-01 14:43:59,028 - misp-modules - INFO - Unable to load MISP modules from package.
misp@misp:/usr/local/src/misp-modules$ sudo -E pip install -I -e .
Obtaining file:///usr/local/src/misp-modules
Running setup.py (path:/usr/local/src/misp-modules/setup.py) egg_info for package from file:///usr/local/src/misp-modules
Downloading/unpacking tornado (from misp-modules==1.0)
Downloading tornado-4.4.2.tar.gz (460kB): 460kB downloaded
Running setup.py (path:/tmp/pip_build_root/tornado/setup.py) egg_info for package tornado
no previously-included directories found matching 'docs/build'
warning: no files found matching 'tornado/test/README'
Downloading/unpacking dnspython3 (from misp-modules==1.0)
Downloading dnspython3-1.15.0.zip
Running setup.py (path:/tmp/pip_build_root/dnspython3/setup.py) egg_info for package dnspython3
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/dnspython3/setup.py", line 25
"""+"="*78, file=sys.stdout)
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/dnspython3/setup.py", line 25
"""+"="*78, file=sys.stdout)
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/dnspython3
Storing debug log for failure in /home/misp/.pip/pip.log
It is a virtual test MISP, so I would not really care about virtualenv etc.
pip3, sorry.
Bam, @cudeso your suggestions solved it.
Thx, will make a short update to the readme to help the next developer take that step easier.
@deralexxx Thank you.
My idea is to create a new import modules for misp.
I did a cp
Changed
to:
But:
Gives me:
So I am missing testimport2 showing up in loaded modules. Any ideas?