mirror of https://github.com/pyodide/pyodide.git
Package setuptools
This commit is contained in:
parent
42bdef2306
commit
c512d8237d
|
@ -13,6 +13,7 @@ requirements:
|
|||
- more-itertools
|
||||
- pluggy
|
||||
- py
|
||||
- setuptools
|
||||
|
||||
test:
|
||||
imports:
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package:
|
||||
name: setuptools
|
||||
version: 40.0.0
|
||||
|
||||
source:
|
||||
url: https://pypi.io/packages/source/s/setuptools/setuptools-40.0.0.zip
|
||||
sha256: 012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f
|
||||
|
||||
patches:
|
||||
- patches/remove-ctypes.patch
|
||||
|
||||
requirements:
|
||||
run:
|
||||
- pyparsing
|
||||
|
||||
test:
|
||||
imports:
|
||||
- setuptools
|
||||
- easy_install
|
||||
- pkg_resources
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/setuptools/glibc.py b/setuptools/glibc.py
|
||||
index a134591c..c31fc78a 100644
|
||||
--- a/setuptools/glibc.py
|
||||
+++ b/setuptools/glibc.py
|
||||
@@ -2,13 +2,13 @@
|
||||
# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/utils/glibc.py
|
||||
from __future__ import absolute_import
|
||||
|
||||
-import ctypes
|
||||
import re
|
||||
import warnings
|
||||
|
||||
|
||||
def glibc_version_string():
|
||||
"Returns glibc version string, or None if not using glibc."
|
||||
+ import ctypes
|
||||
|
||||
# ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
|
||||
# manpage says, "If filename is NULL, then the returned handle is for the
|
||||
diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py
|
||||
index cb977cff..1ca64fbb 100644
|
||||
--- a/setuptools/windows_support.py
|
||||
+++ b/setuptools/windows_support.py
|
||||
@@ -1,5 +1,4 @@
|
||||
import platform
|
||||
-import ctypes
|
||||
|
||||
|
||||
def windows_only(func):
|
||||
@@ -17,6 +16,7 @@ def hide_file(path):
|
||||
|
||||
`path` must be text.
|
||||
"""
|
||||
+ import ctypes
|
||||
__import__('ctypes.wintypes')
|
||||
SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW
|
||||
SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD
|
Loading…
Reference in New Issue