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
0fd2fffe
Commit
0fd2fffe
authored
Nov 28, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support a MAKE environment variable to use gmake. Fixes #888
parent
b4812e3b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
209 deletions
+41
-209
README.rst
README.rst
+13
-2
_setuputils.py
_setuputils.py
+4
-1
changelog.rst
changelog.rst
+4
-0
deps/c-ares/ares_build.h
deps/c-ares/ares_build.h
+0
-194
doc/generate_rst.py
doc/generate_rst.py
+16
-8
doc/intro.rst
doc/intro.rst
+4
-4
No files found.
README.rst
View file @
0fd2fffe
...
@@ -13,7 +13,7 @@ Features include:
...
@@ -13,7 +13,7 @@ Features include:
* DNS queries performed through c-ares_ or a threadpool.
* DNS queries performed through c-ares_ or a threadpool.
* Ability to use standard library and 3rd party modules written for standard blocking sockets
* Ability to use standard library and 3rd party modules written for standard blocking sockets
gevent
_
is `inspired by eventlet`_ but features more consistent API,
gevent is `inspired by eventlet`_ but features more consistent API,
simpler implementation and better performance. Read why others `use
simpler implementation and better performance. Read why others `use
gevent`_ and check out the list of the `open source projects based on
gevent`_ and check out the list of the `open source projects based on
gevent`_.
gevent`_.
...
@@ -64,12 +64,23 @@ To hack on gevent (using a virtualenv)::
...
@@ -64,12 +64,23 @@ To hack on gevent (using a virtualenv)::
.. note::
.. note::
You must have Cython, a C compiler, and the Python
You must have Cython,
GNU Make,
a C compiler, and the Python
development headers installed to build a checkout. Installing CFFI
development headers installed to build a checkout. Installing CFFI
on CPython (it's standard on PyPy) allows building the CFFI backend
on CPython (it's standard on PyPy) allows building the CFFI backend
for testing, and tox is the command used to test multiple versions
for testing, and tox is the command used to test multiple versions
of Python.
of Python.
BSD based systems like FreeBSD and OpenBSD often have BSD Make on
the PATH as the default ``make`` command, but building gevent from a
source checkout (not a source tarball distributed on PyPI) requires
GNU Make. GNU Make is often called ``gmake``. If you experience
Makefile-related problems building gevent from source on one of
these platforms, you can set the ``MAKE`` environment variable to
the executable that invokes GNU Make. For example::
$ MAKE=gmake python ./setup.py install
Running Tests
Running Tests
-------------
-------------
...
...
_setuputils.py
View file @
0fd2fffe
...
@@ -196,7 +196,10 @@ class MakeSdist(sdist):
...
@@ -196,7 +196,10 @@ class MakeSdist(sdist):
else
:
else
:
if
"PYTHON"
not
in
os
.
environ
:
if
"PYTHON"
not
in
os
.
environ
:
os
.
environ
[
"PYTHON"
]
=
sys
.
executable
os
.
environ
[
"PYTHON"
]
=
sys
.
executable
system
(
'make '
+
targets
)
# Let the user specify the make program, helpful for BSD
# where GNU make might be called gmake
make_program
=
os
.
environ
.
get
(
'MAKE'
,
'make'
)
system
(
make_program
+
' '
+
targets
)
cls
.
_ran_make
=
True
cls
.
_ran_make
=
True
def
run
(
self
):
def
run
(
self
):
...
...
changelog.rst
View file @
0fd2fffe
...
@@ -8,6 +8,10 @@
...
@@ -8,6 +8,10 @@
==================
==================
- Update libev to version 4.23.
- Update libev to version 4.23.
- Allow the ``MAKE`` environment variable to specify the make command
on non-Windows systems for ease of development on BSD systems where
``make`` is BSD make and ``gmake`` is GNU make (gevent requires GNU
make). See :issue:`888`.
1.2a1 (Oct 27, 2016)
1.2a1 (Oct 27, 2016)
====================
====================
...
...
deps/c-ares/ares_build.h
deleted
100644 → 0
View file @
b4812e3b
#ifndef __CARES_BUILD_H
#define __CARES_BUILD_H
/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
/* ================================================================ */
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* See file ares_build.h.in, run configure, and forget that this file
* exists it is only used for non-configure systems.
* But you can keep reading if you want ;-)
*
*/
/* ================================================================ */
/* NOTES FOR NON-CONFIGURE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* Nothing in this file is intended to be modified or adjusted by the
* c-ares library user nor by the c-ares library builder.
*
* If you think that something actually needs to be changed, adjusted
* or fixed in this file, then, report it on the c-ares development
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
*
* Try to keep one section per platform, compiler and architecture,
* otherwise, if an existing section is reused for a different one and
* later on the original is adjusted, probably the piggybacking one can
* be adversely changed.
*
* In order to differentiate between platforms/compilers/architectures
* use only compiler built in predefined preprocessor symbols.
*
* This header file shall only export symbols which are 'cares' or 'CARES'
* prefixed, otherwise public name space would be polluted.
*
* NOTE 2:
* -------
*
* Right now you might be staring at file ares_build.h.dist or ares_build.h,
* this is due to the following reason: file ares_build.h.dist is renamed
* to ares_build.h when the c-ares source code distribution archive file is
* created.
*
* File ares_build.h.dist is not included in the distribution archive.
* File ares_build.h is not present in the git tree.
*
* The distributed ares_build.h file is only intended to be used on systems
* which can not run the also distributed configure script.
*
* On systems capable of running the configure script, the configure process
* will overwrite the distributed ares_build.h file with one that is suitable
* and specific to the library being configured and built, which is generated
* from the ares_build.h.in template file.
*
* If you check out from git on a non-configure platform, you must run the
* appropriate buildconf* script to set up ares_build.h and other local files.
*
*/
/* ================================================================ */
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
/* ================================================================ */
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error
Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
#endif
/* ================================================================ */
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
/* ================================================================ */
#if defined(__DJGPP__) || defined(__GO32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__SALFORDC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__BORLANDC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__TURBOC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__WATCOMC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__POCC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__LCC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__SYMBIAN32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
#elif defined(__MWERKS__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(_WIN32_WCE)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__MINGW32__)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(__VMS)
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
#elif defined(__OS400__)
# if defined(__ILEC400__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__MVS__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(TPF)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
/* ===================================== */
/* KEEP MSVC THE PENULTIMATE ENTRY */
/* ===================================== */
#elif defined(_MSC_VER)
# define CARES_TYPEOF_ARES_SOCKLEN_T int
/* ===================================== */
/* KEEP GENERIC GCC THE LAST ENTRY */
/* ===================================== */
#elif defined(__GNUC__)
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
#else
# error "Unknown non-configure build target!"
Error
Compilation_aborted_Unknown_non_configure_build_target
#endif
/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file */
/* sys/types.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
/* sys/socket.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* Data type definition of ares_socklen_t. */
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
typedef
CARES_TYPEOF_ARES_SOCKLEN_T
ares_socklen_t
;
#endif
#endif
/* __CARES_BUILD_H */
doc/generate_rst.py
View file @
0fd2fffe
...
@@ -3,7 +3,6 @@ from __future__ import print_function
...
@@ -3,7 +3,6 @@ from __future__ import print_function
import
os
import
os
import
glob
import
glob
from
os.path
import
join
,
dirname
,
abspath
,
basename
from
os.path
import
join
,
dirname
,
abspath
,
basename
import
gevent
# do not generate .rst for the following modules as they imported into gevent package
# do not generate .rst for the following modules as they imported into gevent package
...
@@ -21,17 +20,26 @@ template = '''.. AUTOGENERATED -- will be overwritten (remove this comment to sa
...
@@ -21,17 +20,26 @@ template = '''.. AUTOGENERATED -- will be overwritten (remove this comment to sa
:undoc-members:
:undoc-members:
'''
'''
directory
=
dirname
(
abspath
(
gevent
.
__file__
))
def
_find_modules
():
print
(
'Imported gevent from %s'
%
(
directory
,
))
try
:
modules
=
glob
.
glob
(
join
(
directory
,
'*.py'
))
+
glob
.
glob
(
join
(
directory
,
'*.pyc'
))
import
gevent
modules
=
set
(
basename
(
filename
).
split
(
'.'
)[
0
]
for
filename
in
modules
)
except
ImportError
:
modules
=
set
(
name
for
name
in
modules
print
(
"Failed to import gevent, no modules found"
)
if
name
.
startswith
(
'_socket2'
)
or
name
.
startswith
(
'_socket3'
)
or
name
.
startswith
(
'_ssl'
)
return
()
or
not
name
.
startswith
(
'_'
))
directory
=
dirname
(
abspath
(
gevent
.
__file__
))
print
(
'Imported gevent from %s'
%
(
directory
,
))
modules
=
glob
.
glob
(
join
(
directory
,
'*.py'
))
+
glob
.
glob
(
join
(
directory
,
'*.pyc'
))
modules
=
set
(
basename
(
filename
).
split
(
'.'
)[
0
]
for
filename
in
modules
)
modules
=
set
(
name
for
name
in
modules
if
name
.
startswith
(
'_socket2'
)
or
name
.
startswith
(
'_socket3'
)
or
name
.
startswith
(
'_ssl'
)
or
not
name
.
startswith
(
'_'
))
return
modules
import
warnings
import
warnings
warnings
.
simplefilter
(
'ignore'
,
DeprecationWarning
)
warnings
.
simplefilter
(
'ignore'
,
DeprecationWarning
)
modules
=
_find_modules
()
def
_read
(
fname
,
count
):
def
_read
(
fname
,
count
):
with
open
(
fname
)
as
f
:
with
open
(
fname
)
as
f
:
...
...
doc/intro.rst
View file @
0fd2fffe
...
@@ -51,15 +51,16 @@ other Unix-like operating systems (e.g., FreeBSD, Solaris, etc.)
...
@@ -51,15 +51,16 @@ other Unix-like operating systems (e.g., FreeBSD, Solaris, etc.)
sockets due to `limitations in libev`_.
sockets due to `limitations in libev`_.
gevent and greenlet can both be installed with `pip`_, e.g., ``pip
gevent and greenlet can both be installed with `pip`_, e.g., ``pip
install gevent``. On Windows
and OS X
, both gevent and greenlet are
install gevent``. On Windows
, OS X, and Linux
, both gevent and greenlet are
distributed as binary `wheels`_, so no C compiler is required (so long
distributed as binary `wheels`_, so no C compiler is required (so long
as pip is at least version 8.0).
On Linux or for Mac OS X variant
s
as pip is at least version 8.0).
For other platform
s
without pre-built wheels or if wheel installation is disabled, a C compiler
without pre-built wheels or if wheel installation is disabled, a C compiler
(Xcode on OS X) and the Python development package are required.
(Xcode on OS X) and the Python development package are required.
`cffi`_ can optionally be installed to build the CFFI backend in
`cffi`_ can optionally be installed to build the CFFI backend in
addition to the Cython backend on CPython.
addition to the Cython backend on CPython.
Development instructions can be found `on PyPI <https://pypi.python.org/pypi/gevent#development>`_.
Development instructions (including building from a source checkout)
can be found `on PyPI <https://pypi.python.org/pypi/gevent#development>`_.
__ http://pypi.python.org/pypi/greenlet
__ http://pypi.python.org/pypi/greenlet
.. _`pip`: https://pip.pypa.io/en/stable/installing/
.. _`pip`: https://pip.pypa.io/en/stable/installing/
...
@@ -92,7 +93,6 @@ those compiling gevent from source.
...
@@ -92,7 +93,6 @@ those compiling gevent from source.
libev shipped with gevent. See :ref:`operating_systems_label` for
libev shipped with gevent. See :ref:`operating_systems_label` for
more information.
more information.
Example
Example
=======
=======
...
...
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