| commit 652: | 852c44143fe0 |
| parent 651: | 90403dfc0ce4 |
| branch: | 0.6-maintenance |
uses distutils install schemes now
- View tarek's profile
-
tarek's public repos »
- buildout-distribute
- wikirial
- zopewatcher
- distribute
- hitchhiker-guide-packaging
- staticmetadata
- hgexternals
- distutils-configure
- FormAlchemy
- distutils.version
- extensions
- ldapauth
- virtualenv-distribute-option
- texttools
- distutils-buildbot
- keyringsql
- atomisator
- pypi
- CLVault
- distutils2
- getpass
- pep376
- z3c.recipe.debian
- vsp
- Send message
3 months ago
Changed (Δ236 bytes):
raw changeset »
tests/manual_test.py (16 lines added, 4 lines removed)
Up to file-list tests/manual_test.py:
| … | … | @@ -4,6 +4,8 @@ import shutil |
4 |
4 |
import tempfile |
5 |
5 |
import subprocess |
6 |
6 |
import sys |
7 |
from distutils.command.install import INSTALL_SCHEMES |
|
8 |
from string import Template |
|
7 |
9 |
|
8 |
10 |
if sys.version_info[0] < 3: |
9 |
11 |
from urllib2 import urlopen |
| … | … | @@ -37,17 +39,27 @@ eggs = |
37 |
39 |
BOOTSTRAP = 'http://python-distribute.org/bootstrap.py' |
38 |
40 |
PYVER = sys.version.split()[0][:3] |
39 |
41 |
|
42 |
||
43 |
_VARS = {'base': '.', |
|
44 |
'py_version_short': PYVER} |
|
45 |
||
46 |
if sys.platform == 'win32': |
|
47 |
PURELIB = INSTALL_SCHEMES['nt']['purelib'] |
|
48 |
else: |
|
49 |
PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] |
|
50 |
||
51 |
||
40 |
52 |
@tempdir |
41 |
53 |
def test_virtualenv(): |
42 |
54 |
"""virtualenv with distribute""" |
55 |
purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) |
|
43 |
56 |
os.system('virtualenv --no-site-packages . --distribute') |
44 |
57 |
os.system('bin/easy_install -q distribute==dev') |
45 |
58 |
# linux specific |
46 |
site_pkg = os.listdir( |
|
59 |
site_pkg = os.listdir(purelib) |
|
47 |
60 |
site_pkg.sort() |
48 |
61 |
assert 'distribute' in site_pkg[0] |
49 |
easy_install = os.path.join('.', 'lib', 'python'+PYVER, 'site-packages', |
|
50 |
'easy-install.pth') |
|
62 |
easy_install = os.path.join(purelib, 'easy-install.pth') |
|
51 |
63 |
with open(easy_install) as f: |
52 |
64 |
res = f.read() |
53 |
65 |
assert 'distribute' in res |
| … | … | @@ -74,7 +86,7 @@ def test_full(): |
74 |
86 |
assert len(eggs) == 3 |
75 |
87 |
assert eggs[0].startswith('distribute') |
76 |
88 |
assert eggs[1:] == ['extensions-0.3-py2.6.egg', |
77 |
|
|
89 |
'zc.recipe.egg-1.2.2-py2.6.egg'] |
|
78 |
90 |
|
79 |
91 |
|
80 |
92 |
if __name__ == '__main__': |
