after merging Wesley's partition code that uses python-parted, we now have broken the 'tox' environment that I had added just before.
tox fails due to python-parted not being 'pip installable'.
Below shows the problem, and a work around that probably works for 3.4 also but untested there.
$ tox -e py27
py27 develop-inst-noop: /home/smoser-public/src/curtin/trunk
py27 installed: PyYAML==3.11,argparse==1.2.1,-e bzr+file:///home/smoser-public/src/curtin/trunk.dist@229#egg=curtin-0.1.0-py2.7-dev_r229,funcsigs==0.4,mock==1.3.0,nose==1.3.7,pbr==1.3.0,six==1.9.0,urllib3==1.11,wsgiref==0.1.2
py27 runtests: PYTHONHASHSEED='1583728979'
py27 runtests: commands[0] | /home/smoser-public/src/curtin/trunk/.tox/py27/bin/python /home/smoser-public/src/curtin/trunk/tools/noproxy nosetests
.......................E.............
======================================================================
ERROR: Failure: ImportError (No module named parted)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/smoser-public/src/curtin/trunk/.tox/py27/local/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/smoser-public/src/curtin/trunk/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/smoser-public/src/curtin/trunk/.tox/py27/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/smoser-public/src/curtin/trunk/tests/unittests/test_partitioning.py", line 4, in <module>
import parted
ImportError: No module named parted
----------------------------------------------------------------------
Ran 37 tests in 0.093s
FAILED (errors=1)
ERROR: InvocationError: '/home/smoser-public/src/curtin/trunk/.tox/py27/bin/python /home/smoser-public/src/curtin/trunk/tools/noproxy nosetests'
_____________________________________________________________________________________________________ summary ______________________________________________________________________________________________________
ERROR: py27: commands failed
$ dpkg-query --show python-parted
python-parted 3.10.5-1build1
$ dpkg -L python-parted | while read f; do [ -f "$f" ] && echo $f; done
/usr/lib/python2.7/dist-packages/parted/decorators.py
/usr/lib/python2.7/dist-packages/parted/__init__.py
/usr/lib/python2.7/dist-packages/parted/geometry.py
/usr/lib/python2.7/dist-packages/parted/partition.py
/usr/lib/python2.7/dist-packages/parted/disk.py
/usr/lib/python2.7/dist-packages/parted/cachedlist.py
/usr/lib/python2.7/dist-packages/parted/device.py
/usr/lib/python2.7/dist-packages/parted/alignment.py
/usr/lib/python2.7/dist-packages/parted/constraint.py
/usr/lib/python2.7/dist-packages/parted/filesystem.py
/usr/lib/python2.7/dist-packages/pyparted-3.10.5.egg-info
/usr/lib/python2.7/dist-packages/_ped.x86_64-linux-gnu.so
/usr/share/doc/python-parted/README
/usr/share/doc/python-parted/copyright
/usr/share/doc/python-parted/TODO
/usr/share/doc/python-parted/BUGS
/usr/share/doc/python-parted/changelog.Debian.gz
/usr/share/doc/python-parted/examples/make_one_primary_partition.py.gz
/usr/share/doc/python-parted/HACKING.gz
$ cp -a /usr/lib/python2.7/dist-packages/parted/ .tox/py27/lib/python2.7/site-packages/
$ cp /usr/lib/python2.7/dist-packages/_ped.x86_64-linux-gnu.so .tox/py27/lib/python2.7/site-packages/parted/
$ tox -e py27
py27 develop-inst-noop: /home/smoser-public/src/curtin/trunk
py27 installed: PyYAML==3.11,argparse==1.2.1,-e bzr+file:///home/smoser-public/src/curtin/trunk.dist@229#egg=curtin-0.1.0-py2.7-dev_r229,funcsigs==0.4,mock==1.3.0,nose==1.3.7,pbr==1.3.0,six==1.9.0,urllib3==1.11,wsgiref==0.1.2
py27 runtests: PYTHONHASHSEED='3735920778'
py27 runtests: commands[0] | /home/smoser-public/src/curtin/trunk/.tox/py27/bin/python /home/smoser-public/src/curtin/trunk/tools/noproxy nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.103s
OK
_____________________________________________________________________________________________________ summary ______________________________________________________________________________________________________
py27: commands succeeded
congratulations :)
Also note, I did try 'sitepackages = True' in tox.ini, but that didn't work either.
it failed like:
$ tox --recreate -e py27 public/ src/curtin/ custom- partitioning- incremental- 2/.tox/ py27 smoser- public/ src/curtin/ custom- partitioning- incremental- 2/test- requirements. txt, -r/home/ smoser- public/ src/curtin/ custom- partitioning- incremental- 2/requirements. txt public/ src/curtin/ custom- partitioning- incremental- 2 entry_point( 'tox==2. 1.1', 'console_scripts', 'tox')() python3/ dist-packages/ tox/session. py", line 39, in main config) .runcommand( ) python3/ dist-packages/ tox/session. py", line 373, in runcommand _test() python3/ dist-packages/ tox/session. py", line 540, in subcommand_test cmdexec( "%s freeze" % (pip)) python3/ dist-packages/ py/_process/ cmdexec. py", line 28, in cmdexec (status, status, cmd, out, err) cmdexec. Error: ExecutionFailed: 2 /home/smoser- public/ src/curtin/ custom- partitioning- incremental- 2/.tox/ py27/bin/ pip freeze smoser- public/ src/curtin/ custom- partitioning- incremental- 2/.tox/ py27/local/ lib/python2. 7/site- packages/ pip/basecommand .py", line 122, in main smoser- public/ src/curtin/ custom- partitioning- incremental- 2/.tox/ py27/local/ lib/python2. 7/site- packages/ pip/commands/ freeze. py", line 74, in run rement. from_dist( dist, dependency_links, find_tags= find_tags) smoser- public/ src/curtin/ custom- partitioning- incremental- 2/.tox/ py27/local/ lib/python2. 7/site- packages/ pip/__init_ _.py", line 299, in from_dist
py27 create: /home/smoser-
py27 installdeps: -r/home/
py27 develop-inst: /home/smoser-
Traceback (most recent call last):
File "/usr/bin/tox", line 9, in <module>
load_
File "/usr/lib/
retcode = Session(
File "/usr/lib/
return self.subcommand
File "/usr/lib/
output = py.process.
File "/usr/lib/
raise ExecutionFailed
py.process.
Exception:
Traceback (most recent call last):
File "/home/
status = self.run(options, args)
File "/home/
req = pip.FrozenRequi
File "/home/
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
Storing debug log for failure in /home/smoser/ .pip/pip. log