Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Xavier Thompson
cython
Commits
90fa8d7c
Commit
90fa8d7c
authored
Aug 11, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release'
parents
a6605cb7
e9194f7f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
CHANGES.rst
CHANGES.rst
+3
-0
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+12
-1
docs/src/reference/compilation.rst
docs/src/reference/compilation.rst
+6
-3
No files found.
CHANGES.rst
View file @
90fa8d7c
...
@@ -65,6 +65,9 @@ Bugs fixed
...
@@ -65,6 +65,9 @@ Bugs fixed
* Bazel integration failed to compile ``.py`` files.
* Bazel integration failed to compile ``.py`` files.
Patch by Guro Bokum (Github issue #1784).
Patch by Guro Bokum (Github issue #1784).
* Some include directories and dependencies were referenced with their absolute paths
in the generated files despite lying within the project directory.
0.26 (2017-07-19)
0.26 (2017-07-19)
=================
=================
...
...
Cython/Build/Dependencies.py
View file @
90fa8d7c
...
@@ -76,6 +76,15 @@ else:
...
@@ -76,6 +76,15 @@ else:
basestring
=
str
basestring
=
str
def
_make_relative
(
file_paths
,
base
=
None
):
if
not
base
:
base
=
os
.
getcwd
()
if
base
[
-
1
]
!=
os
.
path
.
sep
:
base
+=
os
.
path
.
sep
return
[
_relpath
(
path
,
base
)
if
path
.
startswith
(
base
)
else
path
for
path
in
file_paths
]
def
extended_iglob
(
pattern
):
def
extended_iglob
(
pattern
):
if
'{'
in
pattern
:
if
'{'
in
pattern
:
m
=
re
.
match
(
'(.*){([^}]+)}(.*)'
,
pattern
)
m
=
re
.
match
(
'(.*){([^}]+)}(.*)'
,
pattern
)
...
@@ -617,8 +626,10 @@ class DependencyTree(object):
...
@@ -617,8 +626,10 @@ class DependencyTree(object):
info
=
self
.
parse_dependencies
(
filename
)[
3
]
info
=
self
.
parse_dependencies
(
filename
)[
3
]
kwds
=
info
.
values
kwds
=
info
.
values
cimports
,
externs
,
incdirs
=
self
.
cimports_externs_incdirs
(
filename
)
cimports
,
externs
,
incdirs
=
self
.
cimports_externs_incdirs
(
filename
)
basedir
=
os
.
getcwd
()
# Add dependencies on "cdef extern from ..." files
# Add dependencies on "cdef extern from ..." files
if
externs
:
if
externs
:
externs
=
_make_relative
(
externs
,
basedir
)
if
'depends'
in
kwds
:
if
'depends'
in
kwds
:
kwds
[
'depends'
]
=
list
(
set
(
kwds
[
'depends'
]).
union
(
externs
))
kwds
[
'depends'
]
=
list
(
set
(
kwds
[
'depends'
]).
union
(
externs
))
else
:
else
:
...
@@ -627,7 +638,7 @@ class DependencyTree(object):
...
@@ -627,7 +638,7 @@ class DependencyTree(object):
# "cdef extern from ..." files
# "cdef extern from ..." files
if
incdirs
:
if
incdirs
:
include_dirs
=
list
(
kwds
.
get
(
'include_dirs'
,
[]))
include_dirs
=
list
(
kwds
.
get
(
'include_dirs'
,
[]))
for
inc
in
incdirs
:
for
inc
in
_make_relative
(
incdirs
,
basedir
)
:
if
inc
not
in
include_dirs
:
if
inc
not
in
include_dirs
:
include_dirs
.
append
(
inc
)
include_dirs
.
append
(
inc
)
kwds
[
'include_dirs'
]
=
include_dirs
kwds
[
'include_dirs'
]
=
include_dirs
...
...
docs/src/reference/compilation.rst
View file @
90fa8d7c
...
@@ -368,9 +368,12 @@ Cython code. Here is the list of currently supported directives:
...
@@ -368,9 +368,12 @@ Cython code. Here is the list of currently supported directives:
``binding`` (True / False)
``binding`` (True / False)
Controls whether free functions behave more like Python's CFunctions
Controls whether free functions behave more like Python's CFunctions
(e.g. :func:`len`) or, when set to True, more like Python's functions
(e.g. :func:`len`) or, when set to True, more like Python's functions.
(which, among other things, bind to an instance when looked up as a
When enabled, functions will bind to an instance when looked up as a
class attribute).
class attribute (hence the name) and will emulate the attributes
of Python functions, including introspections like argument names and
annotations.
Default is False.
``boundscheck`` (True / False)
``boundscheck`` (True / False)
If set to False, Cython is free to assume that indexing operations
If set to False, Cython is free to assume that indexing operations
...
...
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