Skip to content

Commit

Permalink
Merge 8691b61 into 5de5a0a
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbywater committed Jul 4, 2019
2 parents 5de5a0a + 8691b61 commit 6365276
Show file tree
Hide file tree
Showing 17 changed files with 374 additions and 192 deletions.
5 changes: 2 additions & 3 deletions dev/prepare-distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def build_and_test(cwd):
# Declare temporary working directory variable.
# tmpcwd27 = os.path.join(cwd, 'tmpve2.7')
tmpcwd34 = os.path.join(cwd, 'tmpve3.7')
tmpcwd37 = os.path.join(cwd, 'tmpve3.7')

# Build distribution.
subprocess.check_call([sys.executable, 'setup.py', 'clean', '--all'], cwd=cwd)
Expand All @@ -27,7 +27,7 @@ def build_and_test(cwd):

targets = [
# (tmpcwd27, 'python2.7'),
(tmpcwd34, 'python3.7'),
(tmpcwd37, 'python3.7'),
]
for (tmpcwd, python_executable) in targets:

Expand Down Expand Up @@ -76,7 +76,6 @@ def build_and_test(cwd):


def test_installation(tmpcwd):
subprocess.check_call(['bin/python', '-c', 'import dateutil.parser'], cwd=tmpcwd)
subprocess.check_call(['bin/python', '-m' 'unittest', 'discover', 'eventsourcing.tests'], cwd=tmpcwd)


Expand Down
16 changes: 12 additions & 4 deletions dev/test-released-distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,36 @@
def test_released_distribution(cwd):
# Declare temporary working directory variable.
tmpcwd27 = os.path.join(cwd, 'tmpve2.7')
tmpcwd34 = os.path.join(cwd, 'tmpve3.6')
tmpcwd36 = os.path.join(cwd, 'tmpve3.6')
tmpcwd37 = os.path.join(cwd, 'tmpve3.7')

for (tmpcwd, python_executable) in [(tmpcwd27, 'python2.7'), (tmpcwd34, 'python3.6')]:
build_targets = [
# (tmpcwd27, 'python2.7'),
# (tmpcwd36, 'python3.6'),
(tmpcwd37, 'python3.7')
]
for (tmpcwd, python_executable) in build_targets:

# Rebuild virtualenvs.
rebuild_virtualenv(cwd, tmpcwd, python_executable)

# Install from PyPI.
subprocess.check_call(['bin/pip', 'install', '--no-cache-dir', '-U', 'eventsourcing[testing]'], cwd=tmpcwd)
os.environ['CASS_DRIVER_NO_CYTHON'] = '1'
subprocess.check_call(['bin/pip', 'install', '--no-cache-dir', 'eventsourcing[testing]'],
cwd=tmpcwd)

# Check installed tests all pass.
test_installation(tmpcwd)


def test_installation(tmpcwd):
subprocess.check_call(['bin/python', '-m', 'dateutil.parser'], cwd=tmpcwd)
subprocess.check_call(['bin/python', '-m' 'unittest', 'discover', 'eventsourcing.tests'], cwd=tmpcwd)


def rebuild_virtualenv(cwd, venv_path, python_executable):
subprocess.check_call(['rm', '-rf', venv_path], cwd=cwd)
subprocess.check_call(['virtualenv', '-p', python_executable, venv_path], cwd=cwd)
subprocess.check_call(['bin/pip', 'install', '-U', 'pip', 'wheel'], cwd=venv_path)


if __name__ == '__main__':
Expand Down
Loading

0 comments on commit 6365276

Please sign in to comment.