Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/78484


Change subject: Run python setup.py install before running tests, but don't 
call generate_user_files.py if in travis
......................................................................

Run python setup.py install before running tests, but don't call 
generate_user_files.py if in travis

Change-Id: Ic000475ccbdc84932e10d37f34caf72fbc49bf0c
---
M .travis.yml
M setup.py
2 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/78484/1

diff --git a/.travis.yml b/.travis.yml
index 21b46e9..ce83ed5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,7 @@
 
   - touch ~/.pywikibot/passwordfile
   - echo "('Pywikibot-test', '"$USER_PASSWORD"')" > ~/.pywikibot/passwordfile
+  - python setup.py install
 
 script:
   - python setup.py test
diff --git a/setup.py b/setup.py
index 4273db2..4076cf3 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@
 # Distributed under the terms of the MIT license.
 #
 import sys
-
+import os
 from distribute_setup import use_setuptools
 use_setuptools()
 
@@ -32,7 +32,8 @@
 
 # automatically launch generate_user_files.py
 
-import subprocess
-python = sys.executable
-python = python.replace("pythonw.exe", "python.exe")  # for Windows
-ignore = subprocess.call([python, "generate_user_files.py"])
+if not 'TRAVIS' in os.environ:
+    import subprocess
+    python = sys.executable
+    python = python.replace("pythonw.exe", "python.exe")  # for Windows
+    ignore = subprocess.call([python, "generate_user_files.py"])

-- 
To view, visit https://gerrit.wikimedia.org/r/78484
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic000475ccbdc84932e10d37f34caf72fbc49bf0c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to