i'm trying to build a deb package with Spotify's dh-virtualenv debian package helper.
Error Message I Get:
while running dpkg-buildpackage -us -uc
:
(venv) $ dpkg-buildpackage -us -uc
dpkg-buildpackage: source package ese-xlr8r
dpkg-buildpackage: source version 1.4.7
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by Special Characters <[email protected]>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build active
fakeroot debian/rules clean
: No such file or directory
'. Stop. No rule to make target `
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
I don't know why it won't find the rules file. I can run the file manually without fakeroot and it works (or at least it passes that initial error):
: command not found
: no such job
dh_testdir
dh_auto_clean
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
/home/echostar/projects/XLR8R/active/venv/local/lib/python2.7/site-packages/setuptools/dist.py:364: UserWarning: Normalizing '1.4.10
' to '1.4.10'
normalized_version,
running clean
'build/lib.linux-x86_64-2.7' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
dh_clean
As you don't see the "No such file or directory" error. I can reproduce the error with fakeroot:
(venv) $ fakeroot debian/rules
: No such file or directory
'. Stop. No rule to make target `
Here's my rules file:
(venv) $ cat debian/rules
#!/usr/bin/make -f
%:
dh $@ --with python-virtualenv
Am I missing something?
Note: 'venv' is the name of my virtualenv and is active.
UPDATE 08/23/2016 I copied my code to another VM in our datacenter with slightly older Ubuntu and re-installed everything and ran the buildpackage command. This time it made it much further but at the end still similar error. I won't post the whole buildpackage log but here's the gist in the end:
New python executable in debian/ese-xlr8r/usr/share/python/ese-xlr8r/bin/python
Installing setuptools, pip...done.
Downloading/unpacking behave==1.2.5 (from -r ./requirements.txt (line 1))
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement behave==1.2.5 (from -r ./requirements.txt (line 1))
Cleaning up...
No distributions at all found for behave==1.2.5 (from -r ./requirements.txt (line 1))
Storing debug log for failure in /home/echostar/.pip/pip.log
Traceback (most recent call last):
File "/usr/bin/dh_virtualenv", line 106, in <module>
sys.exit(main() or 0)
File "/usr/bin/dh_virtualenv", line 86, in main
deploy.install_dependencies()
File "/usr/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 172, in install_dependencies
subprocess.check_call(self.pip('-r', requirements_path))
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/echostar/dan/xlr8r/debian/ese-xlr8r/usr/share/python/ese-xlr8r/bin/python', '/home/echostar/dan/xlr8r/debian/ese-xlr8r/usr/share/python/ese-xlr8r/bin/pip', 'install', '--log=/tmp/tmpNybuqh', '-r', './requirements.txt']' returned non-zero exit status 1
make: *** [binary] Error 1
dpkg-buildpackage: error: debian/rules binary gave error exit status 2
I don't know why it's calling pip with a python prefix like: python pip install -r ./requirements.txt
Pip is not a python file to be called like that. possible bug in dh-virtualenv?
While building the Python virtualenv, pip was not able to satisfy one of the project's dependencies:
Which would have been listed in the
requirements.txt
file of the project.