Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
4a75ad7d
Commit
4a75ad7d
authored
Dec 07, 2017
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to compile libuv as CFFI on PyPy/Windows.
parent
fc34e2ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
28 deletions
+25
-28
appveyor.yml
appveyor.yml
+10
-15
setup.py
setup.py
+15
-13
No files found.
appveyor.yml
View file @
4a75ad7d
...
...
@@ -10,12 +10,11 @@ environment:
# Pre-installed Python versions, which Appveyor may upgrade to
# a later point release.
# XXX: Sadly, PyPy won't link CFFI on Win32
# - PYTHON: "C:\\pypy-4.0.1-win32"
# PYTHON_ID: "pypy"
# PYTHON_EXE: pypy
# PYTHON_VERSION: "2.7.x"
# PYTHON_ARCH: "32"
-
PYTHON
:
"
C:
\\
pypy2-v5.9.0-win32"
PYTHON_ID
:
"
pypy"
PYTHON_EXE
:
pypy
PYTHON_VERSION
:
"
2.7.x"
PYTHON_ARCH
:
"
32"
-
PYTHON
:
"
C:
\\
Python36-x64"
PYTHON_VERSION
:
"
3.6.x"
# currently 3.6.0
...
...
@@ -91,14 +90,11 @@ install:
New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
}
if ("${env:PYTHON_ID}" -eq "pypy") {
if (!(Test-Path "${env:PYTMP}\pypy-4.0.1-win32.zip")) {
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-win32.zip', "${env:PYTMP}\pypy-4.0.1-win32.zip");
}
7z x -y "${env:PYTMP}\pypy-4.0.1-win32.zip" -oC:\ | Out-Null;
if (!(Test-Path "${env:PYTMP}\get-pip.py")) {
(New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "${env:PYTMP}\get-pip.py");
if (!(Test-Path "${env:PYTMP}\pypy2-v5.9.0-win32.zip")) {
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy2-5.9.0-win32.zip', "${env:PYTMP}\pypy2-v5.9.0-win32.zip");
}
& "${env:PYTHON}\pypy.exe" "${env:PYTMP}\get-pip.py";
7z x -y "${env:PYTMP}\pypy2-v5.9.0-win32.zip" -oC:\ | Out-Null;
& "${env:PYTHON}\pypy.exe" "-mensurepip";
}
elseif (-not(Test-Path($env:PYTHON))) {
...
...
@@ -123,8 +119,7 @@ install:
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
# NOTE: psutil won't install under PyPy.
-
"
%CMD_IN_ENV%
pip
install
-U
wheel
cython
greenlet
psutil"
-
"
%CMD_IN_ENV%
pip
install
-U
wheel
cython
greenlet
psutil
cffi"
-
ps
:
"
if(Test-Path(
\"
${env:PYTHON}
\\
bin
\"
))
{ls
${env:PYTHON}
\\
bin;}"
-
ps
:
"
if(Test-Path(
\"
${env:PYTHON}
\\
Scripts
\"
))
{ls
${env:PYTHON}
\\
Scripts;}"
...
...
setup.py
View file @
4a75ad7d
...
...
@@ -7,7 +7,7 @@ import os
from
_setuputils
import
read
from
_setuputils
import
read_version
from
_setuputils
import
system
from
_setuputils
import
PYPY
,
WIN
,
CFFI_WIN_BUILD_ANYWAY
from
_setuputils
import
PYPY
,
WIN
from
_setuputils
import
IGNORE_CFFI
from
_setuputils
import
ConfiguringBuildExt
from
_setuputils
import
MakeSdist
...
...
@@ -19,15 +19,6 @@ from _setuputils import BuildFailed
from
setuptools
import
Extension
,
setup
from
setuptools
import
find_packages
if
PYPY
and
WIN
and
not
CFFI_WIN_BUILD_ANYWAY
:
# We can't properly handle (hah!) file-descriptors and
# handle mapping on Windows/CFFI, because the file needed,
# libev_vfd.h, can't be included, linked, and used: it uses
# Python API functions, and you're not supposed to do that from
# CFFI code. Plus I could never get the libraries= line to ffi.compile()
# correct to make linking work.
raise
Exception
(
"Unable to install on PyPy/Windows"
)
if
WIN
:
# Make sure the env vars that make.cmd needs are set
if
not
os
.
environ
.
get
(
'PYTHON_EXE'
):
...
...
@@ -68,12 +59,23 @@ EXT_MODULES = [
LOCAL
,
]
cffi_modules
=
[
'src/gevent/libev/_corecffi_build.py:ffi'
,
]
cffi_modules
=
[]
if
not
WIN
:
# We can't properly handle (hah!) file-descriptors and
# handle mapping on Windows/CFFI with libev, because the file needed,
# libev_vfd.h, can't be included, linked, and used: it uses
# Python API functions, and you're not supposed to do that from
# CFFI code. Plus I could never get the libraries= line to ffi.compile()
# correct to make linking work.
cffi_modules
.
append
(
'src/gevent/libev/_corecffi_build.py:ffi'
)
if
not
WIN
:
EXT_MODULES
.
append
(
LIBUV
)
if
not
WIN
or
PYPY
:
cffi_modules
.
append
(
'src/gevent/libuv/_corecffi_build.py:ffi'
)
if
PYPY
:
...
...
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