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
f3057406
Commit
f3057406
authored
May 02, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'configure-caching'
parents
9610e1a1
19fe5066
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
25 deletions
+49
-25
.gitignore
.gitignore
+3
-0
.travis.yml
.travis.yml
+43
-23
_setupares.py
_setupares.py
+1
-1
_setuplibev.py
_setuplibev.py
+1
-1
_setuputils.py
_setuputils.py
+1
-0
No files found.
.gitignore
View file @
f3057406
...
...
@@ -45,6 +45,7 @@ docs/__pycache__
# Artifacts of configuring in place
deps/c-ares/config.log
deps/c-ares/config.status
deps/c-ares/config.cache
deps/c-ares/stamp-h1
deps/c-ares/stamp-h2
deps/c-ares/ares_build.h.orig
...
...
@@ -73,6 +74,7 @@ deps/libev/Makefile
deps/libev/config.log
deps/libev/config.h
deps/libev/config.status
deps/libev/config.cache
deps/libev/configure-output.txt
deps/libev/libtool
deps/libev/stamp-h1
...
...
@@ -86,6 +88,7 @@ deps/libuv/Makefile
deps/libuv/config.log
deps/libuv/config.h
deps/libuv/config.status
deps/libev/config.cache
deps/libduv/libtool
deps/libuv/stamp-h1
deps/libuv/.libs
...
...
.travis.yml
View file @
f3057406
...
...
@@ -18,7 +18,9 @@ env:
-
CCACHE_SLOPPINESS=file_macro,time_macros,include_file_ctime,include_file_mtime
-
CCACHE_NOHASHDIR=true
-
BUILD_LIBS=$HOME/.libs
-
CFLAGS="-g -pipe"
# Disable some warnings produced by libev especially and also some Cython generated code.
# Note that changing the value of these variables invalidates configure caches
-
CFLAGS="-g -pipe -Wno-strict-aliasing -Wno-comment"
-
CPPFLAGS="-I$BUILD_LIBS/include -DEV_VERIFY=3"
-
LDFLAGS="-L$BUILD_LIBS/lib"
-
LD_LIBRARY_PATH="$BUILD_LIBS/lib"
...
...
@@ -51,6 +53,10 @@ matrix:
before_install
:
-
export PATH=$BUILD_RUNTIMES/snakepit/$TRAVIS_PYTHON_VERSION.d/bin:$PATH
-
export G_SITE=$BUILD_RUNTIMES/snakepit/$TRAVIS_PYTHON_VERSION.d/lib/*/site-packages/
# Restore the configure caches
-
if [ -f $BUILD_LIBS/config.cache.ares ]; then cp $BUILD_LIBS/config.cache.ares deps/c-ares/config.cache ; fi
-
if [ -f $BUILD_LIBS/config.cache.libev ]; then cp $BUILD_LIBS/config.cache.libev deps/libev/config.cache ; fi
-
if [ -f $BUILD_LIBS/config.cache.libuv ]; then cp $BUILD_LIBS/config.cache.libuv deps/libuv/config.cache ; fi
before_script
:
# Show some details of interest
...
...
@@ -62,6 +68,25 @@ before_script:
-
>
python -c "import gevent.ares; print(gevent.ares)"
cache
:
pip
:
true
directories
:
-
$HOME/.venv
-
$HOME/.runtimes
-
$HOME/.wheelhouse
-
$HOME/.ccache
-
$HOME/.libs
before_cache
:
-
rm -f $HOME/.cache/pip/log/debug.log
# Store the configure caches. Having a cache can speed up c-ares
# configure from 2-3 minutes to 20 seconds.
-
mkdir -p $BUILD_LIBS
-
cp deps/c-ares/config.cache $BUILD_LIBS/config.cache.ares
-
cp deps/libev/config.cache $BUILD_LIBS/config.cache.libev
-
cp deps/libuv/config.cache $BUILD_LIBS/config.cache.libuv
# Installing is taken care of by the first stage.
install
:
-
ls -l $BUILD_RUNTIMES/snakepit/
...
...
@@ -111,7 +136,11 @@ jobs:
# so that we don't have to use build isolation and can better use the cache;
# Note that we can't use -U for cffi and greenlet on PyPy.
-
&build-gevent-deps
pip install -U setuptools wheel && pip install cffi cython greenlet
-
pip install --no-build-isolation .[test]
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
# output (pip install uses a random temporary directory, making this difficult)
-
python setup.py bdist_wheel
-
pip uninstall -y gevent
-
pip install `ls dist/*whl`[test]
script
:
ccache -s
before_script
:
true
after_success
:
true
...
...
@@ -131,23 +160,27 @@ jobs:
# Install the Python runtime
-
*build-gevent-python
-
*build-gevent-deps
-
ls -l $G_SITE
# Install the C dependencies to a known location. This is used
# to test 'no embed' cases. It might seem like it would prime
# the CCache for when we *do* embed if we did it as part of the generic build stage,
# but overall it just seems to slow things down. The Travis caching and CCache is not working as
# well as we would hope.
-
pushd deps/libev && ./configure --prefix=$BUILD_LIBS && make install && popd
-
pushd deps/c-ares && ./configure --prefix=$BUILD_LIBS && make -j4 install && popd
-
pushd deps/libuv && ./autogen.sh && ./configure --disable-static --prefix=$BUILD_LIBS && make -j4 install && popd
# the CCache for when we *do* embed if we did it as part of
# the generic build stage, but overall it just seems to slow
# things down. The Travis caching and CCache is not working as
# well as we would hope. (XXX: Probably because in the past we
# used pip install which used temporary directories.)
-
pushd deps/libev && ./configure -C --prefix=$BUILD_LIBS && make install && popd
-
pushd deps/c-ares && ./configure -C --prefix=$BUILD_LIBS && make -j4 install && popd
-
pushd deps/libuv && ./autogen.sh && ./configure -C --disable-static --prefix=$BUILD_LIBS && make -j4 install && popd
# libev builds a manpage each time, and it includes today's date, so it frequently changes.
# delete to avoid repacking the archive
-
rm -rf $BUILD_LIBS/share/man/
-
ls -l $BUILD_LIBS $BUILD_LIBS/lib $BUILD_LIBS/include
-
pip install --no-build-isolation .[test]
-
python setup.py bdist_wheel
-
pip uninstall -y gevent
-
pip install `ls dist/*whl`[test]
# Test that we're actually linking
# to the .so file.
-
objdump -p $G_SITE/gevent/libev/_corecffi*so | grep "NEEDED.*libev.so"
-
objdump -p $G_SITE/gevent/libev/corecext*so | grep "NEEDED.*libev.so"
-
objdump -p $G_SITE/gevent/libuv/_corecffi*so | grep "NEEDED.*libuv.so"
script
:
# Verify that we got non-embedded builds
...
...
@@ -279,16 +312,3 @@ jobs:
notifications
:
email
:
false
cache
:
pip
:
true
directories
:
-
$HOME/.venv
-
$HOME/.runtimes
-
$HOME/.wheelhouse
-
$HOME/.ccache
-
$HOME/.libs
before_cache
:
-
rm -f $HOME/.cache/pip/log/debug.log
_setupares.py
View file @
f3057406
...
...
@@ -43,7 +43,7 @@ else:
ares_configure_command
=
' '
.
join
([
"(cd "
,
quoted_dep_abspath
(
'c-ares'
),
" && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi "
,
" && sh ./configure --disable-dependency-tracking "
+
_m32
+
"CONFIG_COMMANDS= "
,
" && sh ./configure --disable-dependency-tracking
-C
"
+
_m32
+
"CONFIG_COMMANDS= "
,
" && cp ares_config.h ares_build.h
\
"
$OLDPWD
\
"
"
,
" && cat ares_build.h "
,
" && if [ -r ares_build.h.orig ]; then mv ares_build.h.orig ares_build.h; fi)"
,
...
...
_setuplibev.py
View file @
f3057406
...
...
@@ -30,7 +30,7 @@ LIBEV_EMBED = should_embed('libev')
# Configure libev in place
libev_configure_command
=
' '
.
join
([
"(cd "
,
quoted_dep_abspath
(
'libev'
),
" && sh ./configure > configure-output.txt"
,
" && sh ./configure
-C
> configure-output.txt"
,
")"
,
])
...
...
_setuputils.py
View file @
f3057406
...
...
@@ -391,6 +391,7 @@ class GeventClean(clean):
'config.h'
,
'config.log'
,
'config.status'
,
'config.cache'
,
'configure-output.txt'
,
'.libs'
):
...
...
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