Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
53cd70c3
Commit
53cd70c3
authored
Oct 05, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Package joblib
parent
2b2f1de1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
0 deletions
+83
-0
packages/joblib/meta.yaml
packages/joblib/meta.yaml
+15
-0
packages/joblib/patches/ctypes-import.patch
packages/joblib/patches/ctypes-import.patch
+21
-0
packages/joblib/patches/use-setuptools.patch
packages/joblib/patches/use-setuptools.patch
+12
-0
test/test_joblib.py
test/test_joblib.py
+35
-0
No files found.
packages/joblib/meta.yaml
0 → 100644
View file @
53cd70c3
package
:
name
:
joblib
version
:
"
0.11"
source
:
url
:
https://pypi.io/packages/source/j/joblib/joblib-0.11.tar.gz
sha256
:
7b8fd56df36d9731a83729395ccb85a3b401f62a96255deb1a77220c00ed4085
patches
:
-
patches/use-setuptools.patch
-
patches/ctypes-import.patch
test
:
imports
:
-
joblib
packages/joblib/patches/ctypes-import.patch
0 → 100644
View file @
53cd70c3
diff --git a/joblib/backports.py b/joblib/backports.py
index 7dd3df1..a49ef78 100644
--- a/joblib/backports.py
+++ b/joblib/backports.py
@@ -3,7 +3,6 @@
Backports of fixes for joblib dependencies
"""
import os
import time
-import ctypes
import sys
from distutils.version import LooseVersion
@@ -34,6 +33,8 @@
except ImportError:
if os.name == 'nt':
error_access_denied = 5
+ import ctypes
+
try:
from os import replace
except ImportError:
packages/joblib/patches/use-setuptools.patch
0 → 100644
View file @
53cd70c3
diff --git a/setup.py b/setup.py
index 134db18..f705b28 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from distutils.core import setup
+from setuptools import setup
import sys
import joblib
test/test_joblib.py
0 → 100644
View file @
53cd70c3
def
test_joblib_numpy_pickle
(
selenium
):
selenium
.
load_package
([
'numpy'
,
'joblib'
])
selenium
.
run
(
"""
import joblib
import numpy as np
from numpy.testing import assert_array_equal
X = np.ones(10)
file_path = "./X.pkl"
joblib.dump(X, file_path)
X2 = joblib.load(file_path)
assert_array_equal(X, X2)"""
)
def
test_joblib_parallel
(
selenium
):
selenium
.
load_package
([
'numpy'
,
'joblib'
])
selenium
.
clean_logs
()
selenium
.
run
(
"""
from math import sqrt
from joblib import Parallel, delayed
# check that the default multiprocessing backend
# gracefully reduces to n_jobs=1
res = Parallel(n_jobs=2)(delayed(sqrt)(i ** 2)
for i in range(10))
assert res == [sqrt(i ** 2) for i in range(10)]
# check threading backend
Parallel(n_jobs=2, backend='threading')(
delayed(sqrt)(i ** 2) for i in range(10))
"""
)
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