lago-project / lago

Ad-hoc virtual testing environment framework
http://lago.readthedocs.org
GNU General Public License v2.0
47 stars 39 forks source link

make fails: ImportError: No module named dulwich.repo (File "scripts/version_manager.py", line 10, in <module>) #590

Open mykaul opened 7 years ago

mykaul commented 7 years ago

Creating RPM compatible ChangeLog Traceback (most recent call last): File "scripts/version_manager.py", line 10, in import dulwich.repo ImportError: No module named dulwich.repo Failed to generate RPM ChangeLog Makefile:18: recipe for target 'changelog' failed make: *** [changelog] Error 1

Fedora 25, 4901a5876ddbcf376f8df40e1ab3c10c6757f5f4

nvgoldin commented 7 years ago

MM, as far as I know this was always the requirement. Were you ever able to run make without having it installed?

In order to run make or 'python setup.py sdist' we require setuptools, pbr and dulwich. What that was changed recently is https://github.com/lago-project/lago/commit/c9b3202076726d03b830c07487b54e3a4f466dbf, which enforced the requirement for building the sdist.

mykaul commented 7 years ago

Hmm, perhaps I did not set the environment for compilation. Now, 'sudo pip install -r requirement.txt' fails on libvirt, great: [ykaul@ykaul lago]$ sudo pip install -r requirements.txt Requirement already satisfied (use --upgrade to upgrade): configparser in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 2)) Collecting libvirt-python (from -r requirements.txt (line 3)) Using cached libvirt-python-3.4.0.tar.gz Requirement already satisfied (use --upgrade to upgrade): lockfile in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 5)) Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): pbr in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 7)) Requirement already satisfied (use --upgrade to upgrade): pyxdg in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 9)) Requirement already satisfied (use --upgrade to upgrade): scp in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 10)) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 11)) Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 12)) Requirement already satisfied (use --upgrade to upgrade): wrapt in /usr/lib64/python2.7/site-packages (from -r requirements.txt (line 13)) Collecting Jinja2 (from -r requirements.txt (line 14)) Using cached Jinja2-2.9.6-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): xmltodict in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 15)) Requirement already satisfied (use --upgrade to upgrade): cryptography>=1.1 in /usr/lib64/python2.7/site-packages (from paramiko->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/lib/python2.7/site-packages (from paramiko->-r requirements.txt (line 6)) Collecting MarkupSafe>=0.23 (from Jinja2->-r requirements.txt (line 14)) Using cached MarkupSafe-1.0.tar.gz Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): cffi>=1.4.1 in /usr/lib64/python2.7/site-packages (from cryptography>=1.1->paramiko->-r requirements.txt (line 6)) Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->-r requirements.txt (line 6)) Installing collected packages: libvirt-python, MarkupSafe, Jinja2 Running setup.py install for libvirt-python ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-11cuL5/libvirt-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-UGWDi8-record/install-record.txt --single-version-externally-managed --compile: Package libvirt was not found in the pkg-config search path. Perhaps you should add the directory containing libvirt.pc' to the PKG_CONFIG_PATH environment variable No package 'libvirt' found Package libvirt was not found in the pkg-config search path. Perhaps you should add the directory containinglibvirt.pc' to the PKG_CONFIG_PATH environment variable No package 'libvirt' found running install running build /bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt Package libvirt was not found in the pkg-config search path. Perhaps you should add the directory containing `libvirt.pc' to the PKG_CONFIG_PATH environment variable

nvgoldin commented 7 years ago

mm, I noticed that problem on Ubunutu - never on Fedora, but maybe I had something pre-installed. Do you the below installed?

yum install -y libvirt libvirt-devel libguestfs-tools \
    libguestfs-devel gcc libffi-devel openssl-devel qemu-kvm

http://lago.readthedocs.io/en/latest/Installation.html#pip

nvgoldin commented 7 years ago

So I have pkgconfig-0.29.1-1.fc25.x86_64 installed. Try installing it - if it solves the issue I'll add it to the docs. Interestingly we don't require it in the spec file - so something pulls it I guess.

gbenhaim commented 7 years ago

@mykaul Does the fix that @nvgoldin suggest solved the problem?

mykaul commented 7 years ago

No, AFAIR, I fixed it with pip install pyflakes or something.