-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python2 | ||
|
||
# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
|
||
"""Invoke setup.py and make sure that on Python 2.7 it fails but prints | ||
a meaningful error message. | ||
""" | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
||
|
||
ROOT_DIR = os.path.realpath( | ||
os.path.join(os.path.dirname(__file__), "..", "..") | ||
) | ||
|
||
|
||
def main(): | ||
if sys.version_info[:2] != (2, 7): | ||
raise RuntimeError("this script is supposed to be run with python 2.7") | ||
setup_py = os.path.join(ROOT_DIR, "setup.py") | ||
p = subprocess.Popen( | ||
[sys.executable, setup_py], | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
) | ||
stdout, stderr = p.communicate() | ||
assert p.wait() == 1 | ||
assert not stdout, stdout | ||
assert "psutil no longer supports Python 2.7" in stderr, stderr | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters