Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
3eb3e5f9
Commit
3eb3e5f9
authored
Jun 17, 2016
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SciPy test, but not enabled yet.
parent
5cc0a09a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
test/integration/numpy_test.py
test/integration/numpy_test.py
+24
-6
No files found.
test/integration/numpy_test.py
View file @
3eb3e5f9
import
os
import
sys
import
subprocess
import
shutil
"""
Using this test file.
...
...
@@ -64,6 +63,7 @@ SRC_DIR = ENV_NAME
PYTHON_EXE
=
os
.
path
.
abspath
(
ENV_NAME
+
"/bin/python"
)
CYTHON_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"cython-0.22"
))
NUMPY_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"numpy"
))
SCIPY_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"scipy"
))
print_progress_header
(
"Setting up Cython..."
)
if
not
os
.
path
.
exists
(
CYTHON_DIR
):
...
...
@@ -77,7 +77,6 @@ if not os.path.exists(CYTHON_DIR):
subprocess
.
check_call
([
"patch"
,
"-p1"
,
"--input="
+
PATCH_FILE
],
cwd
=
CYTHON_DIR
)
print
">>> Applied Cython patch"
try
:
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"install"
],
cwd
=
CYTHON_DIR
)
subprocess
.
check_call
([
PYTHON_EXE
,
"-c"
,
"import Cython"
],
cwd
=
CYTHON_DIR
)
...
...
@@ -86,6 +85,10 @@ if not os.path.exists(CYTHON_DIR):
else
:
print
">>> Cython already installed."
env
=
os
.
environ
CYTHON_BIN_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
+
"/bin"
))
env
[
"PATH"
]
=
CYTHON_BIN_DIR
+
":"
+
env
[
"PATH"
]
print_progress_header
(
"Cloning up NumPy..."
)
if
not
os
.
path
.
exists
(
NUMPY_DIR
):
url
=
"https://github.com/numpy/numpy"
...
...
@@ -94,10 +97,6 @@ else:
print
">>> NumPy already installed."
try
:
env
=
os
.
environ
CYTHON_BIN_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
+
"/bin"
))
env
[
"PATH"
]
=
CYTHON_BIN_DIR
+
":"
+
env
[
"PATH"
]
print_progress_header
(
"Setting up NumPy..."
)
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"build"
],
cwd
=
NUMPY_DIR
,
env
=
env
)
...
...
@@ -109,6 +108,25 @@ except:
raise
print_progress_header
(
"Cloning up SciPy..."
)
if
not
os
.
path
.
exists
(
SCIPY_DIR
):
url
=
"https://github.com/scipy/scipy"
# subprocess.check_call(["git", "clone", "--depth", "1", "--branch", "v0.17.1", url], cwd=SRC_DIR)
else
:
print
">>> SciPy already installed."
try
:
print_progress_header
(
"Setting up SciPy..."
)
# subprocess.check_call([PYTHON_EXE, "setup.py", "build"], cwd=SCIPY_DIR, env=env)
print_progress_header
(
"Installing SciPy..."
)
# subprocess.check_call([PYTHON_EXE, "setup.py", "install"], cwd=SCIPY_DIR, env=env)
except
:
subprocess
.
check_call
([
"rm"
,
"-rf"
,
SCIPY_DIR
+
"/build"
])
subprocess
.
check_call
([
"rm"
,
"-rf"
,
SCIPY_DIR
+
"/dist"
])
raise
# From Wikipedia
script
=
"""
import numpy as np
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment