| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Ensures files are correctly and immediately closed.
https://bugzilla.gnome.org/show_bug.cgi?id=751926
|
|
|
|
|
|
|
|
| |
Using tempfile.mkstemp should prevent the temp file
from being cleaned while it might still be used by
another process.
https://bugzilla.gnome.org/show_bug.cgi?id=751926
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7ce646db1cb0842db2089df671b17081f82f2b0a.
Apparently this patch caused introspection build breakage for gnome-shell,
as problems occurred during linking for libgnome-volume-control.
Please see bug 728313 comment 105 for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add compiler() and link() functions in ccompiler.py to call
distutil.ccompiler's compile() and link() functions, so that we can in turn
call them from dumper.py to build the dumper program. As distutils don't
get along well with libtool libraries (ie .la files), we can deduce the
libraries to link from using the file name .la file and include
$(builddir)/.libs in the linking stage.
For MSVC builds, we need to ignore mt.exe failing to find a .exe.manifest
file as Visual Studio 2010+ do not generate such files during linking, and
it is done by distutils as Python 2.7.x is built with Visual Studio 2008,
which do generate such manifest files during the build.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a preprocess() function in ccompiler.py so that it will call the
preprocess() method of the distutils.ccompiler class, and make use of it
from sourcescanner.py.
As we would need to set up the options (include paths, macros, undefs) to
pass into the preprocessor (and later for the compiler), we have a new
private function that translates what we have from the rest of giscanner so
that it could be passed to distutils.ccompiler in a way that it
understands.
Also, as the MSVCCompiler classes in distutils do not provide a
preprocess() implementation, we provide our own so that we can use it when
preprocessing, via distutils, through subclassing MSVCCompiler.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates the __init__ constructor method of CCompiler so that distutils
can be used, with some environment or user-supplied options to create the
compiler instance that is appropriate with the platform that the giscanner
scripts are being run on, and sets some specific environment for the
compilers as necessary. This also adds a check_is_msvc() method that will
progressively replace calls in the other giscanner scripts that attempt to
check for CC=cl (or so), where a part of which is done in this patch. This
is done for dumper.py as well as it needs to be updated in this patch to
use the updated ccompiler.py which uses distutils to initiate the compiler
instance.
Also, as we have been using the --library option on Windows to pass in the
library (not DLL) to deduce the correct DLL to link to in the introspection
files for some time, we no longer need to make a copy of the library (.lib)
to introspect that matches the <namespace>-<namespace_version>.lib
convention, but use the libraries that were passed in with --library
directly, so that we can link the dumper program during the introspection
build.
Please note that this also partially reverts commit c9cfa2b as the
distutils items are clearly needed for these to work.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we attempt to move giscanner to use distutils for preprocessing and
building the introspection dumper program, we need to update _parse(),
where the preprocessor is called, to not use stdin and stdout for the
preprocessor input and output, as distutils do not accept such usage.
The added bonus for this change is that MSVC builds can be done without
using MinGW/GCC as a helper, as the '-' flag for preprocessing from stdin
was the hindrance to that.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
| |
Forgot to amend.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=752904
|
|
|
|
|
| |
Updated from:
https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/pep8.py
|
| |
|
|
|
|
|
|
| |
we haven't been emitting the warning for about six
years (see 7dbbda9abea9882d2c98726f382a905fa8738706)
so remove the leftovers...
|
|
|
|
|
|
|
|
| |
288b339edf262f1dba4e87a9faef46cc79749bd5 changed the signature from
def _parse_type_second_pass(self, parent, node, typeval):
to
def _parse_type_array_length(self, siblings, node, typeval)
but failed to change the assert statement accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was reported by HeBD on #introspection that Python modules
use the .pyd extension on windows, not .dll.
The simple fix would have been to just rename to .pyd, but we
started investigating the possibility of acquiring the suffix tuple(s)
via imp.get_suffixes() instead. Which led to the discovery that
imp.load_module() simply ignores the first item of said tuple.
Thus, there is no use in pretending it to be of any importance
in this case so we set it to an empty string.
imp_load_module() source for:
Python 2.6.9 : https://hg.python.org/cpython/file/fcb3ec2842f9/Python/import.c#l3021
Python 2.7.10: https://hg.python.org/cpython/file/15c95b7d81dc/Python/import.c#l3148
and just to be future-proof:
Python 3.4.3 : https://hg.python.org/cpython/file/b4cbecbc0781/Lib/imp.py#l220
|
|
|
|
|
|
|
| |
Python 3 does not write .pyc files like Python 2
used to do but instead put's them in a __pycache__
directory. Simply compute the version hash using
the .py files instead.
|
|
|
|
|
|
|
| |
Not doing this manually all over the place makes
the code slightly more readable.
https://bugzilla.gnome.org/show_bug.cgi?id=689454
|
|
|
|
|
|
| |
02e545371e2132a97458888895cacf57b8c0f83a (2015-06-23)
https://bugzilla.gnome.org/show_bug.cgi?id=725685
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only types are stored in the cache store, so disable
the cache for reparse validate mode since it needs
access to the whole serialized tree.
This fixes a seemingly hard to debug build failure
running 'make distcheck' on source trees configured
with --enable-doctool.
https://bugzilla.gnome.org/show_bug.cgi?id=751238
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract cache and data dir lookup code into documented
get_user_cache_dir() and get_system_data_dirs() functions.
Note that previously, the data dirs code did not fall
back to '/usr/local/share:/usr/share' when the XDG_DATA_DIRS
environment variable was either not set or empty, as required
by the XDG Base Directory Specification.
https://bugzilla.gnome.org/show_bug.cgi?id=747770
|
|
|
|
|
|
|
|
| |
We already use XDG_DATA_DIRS for .gir files lookup
so we might as well honor XDG_CACHE_HOME instead
of hardcoding ~/.cache.
https://bugzilla.gnome.org/show_bug.cgi?id=747770
|
|
|
|
| |
optparse is deprecated.
|
|
|
|
|
|
| |
conversion
https://bugzilla.gnome.org/show_bug.cgi?id=748832
|
|
|
|
|
|
|
|
|
|
| |
Add the command line flag --symbol-filter-cmd to g-ir-scanner
which allows running symbol names through a filtering shell
command. The symbol is sent as stdin to the filter command
and expects a filtered result written to stdout.
https://bugzilla.gnome.org/show_bug.cgi?id=744534
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
| |
remove stray debugging print statement introduced
in db7ab0e797f755fb7ff273a2071d27fd62a2b7c7
|
|
|
|
|
|
|
|
|
| |
It was assumed that cache store was always working, this
also removes a round trip to the cache store. So performance
should also get a small boost.
https://bugzilla.gnome.org/show_bug.cgi?id=746231
Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
|
|
|
|
|
|
|
| |
Allow `identifier`, `parameter` and `tag` part `annotations` fields
to span multiple lines
https://bugzilla.gnome.org/show_bug.cgi?id=676133
|
|
|
|
| |
Synced with https://github.com/zzzeek/sqlalchemy/commit/a4a826021fb6d77fadbdac0071616d7e5486e4d1
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rather than assuming that pkg-config is spelt pkg-config, use the environment
variable $PKG_CONFIG which is the actual detected pkg-config spelling. This is
particularly important when cross-compiling, where the pkg-config may be
prefixed with the target and will actually provide a different result from the
build pkg-config which may be available unprefixed.
https://bugzilla.gnome.org/show_bug.cgi?id=746669
|
|
|
|
|
|
|
|
|
|
| |
Doing so reveals GIRParser did not yet support:
- the (skip) annotation on parameters and return values
- the (attributes) annotation
This patch fixes both issues an prevents further similar problems.
https://bugzilla.gnome.org/show_bug.cgi?id=738171
|
|
|
|
|
|
| |
Otherwise API using it will badly break in weird ways.
https://bugzilla.gnome.org/show_bug.cgi?id=745608
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What we already had:
- (array zero-terminated=1) > array which is NULL terminated
- (array zero-terminated=0) > array which is not NULL terminated
- (array) > array which is not NULL terminated
- (array zero-terminated=X) > array which is not NULL terminated
where X can be anything
What this patch adds:
- (array zero-terminated) > array which is NULL terminated
https://bugzilla.gnome.org/show_bug.cgi?id=657754
|
|
|
|
|
|
|
|
| |
Make it clear that both the dependencies field in the typelib, and the
include elements in the GIR AST, are for immediate dependencies, not
transitive ones.
https://bugzilla.gnome.org/show_bug.cgi?id=743782
|
|
|
|
|
|
|
| |
These may cause cpp to output code that still has #defines in them,
which the scanner does not expect.
https://bugzilla.gnome.org/show_bug.cgi?id=720504
|
|
|
|
|
|
|
|
|
| |
We have special code to look at (type GLib.List(utf8)), but (type
GLib.PtrArray(utf8)) didn't work.
This allows NetworkManager to annotate the ActiveConnections property.
https://bugzilla.gnome.org/show_bug.cgi?id=733879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds options to scannermain so that we can decorate functions with
macros as needed, so that we can use compiler annotations for symbol export
for example.
Options are also added to include headers before or after the main include
block at the top so that we can include headers as necessary in the
generated sources and/or headers, so that we could for example grab
definitions from those headers as needed, such as to grab definitions of
macros used for symbol export.
The testcodegen.py script has been updated as well to make use of this
functionality, if needed.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates giscanner/scannerlexer.l by ignoring the Visual C++-specific
directives, so that the scanner will not bail out while trying to produce
the introspection dumper program source code, and silence many of the
warnings that are produced in the process.
As the Visual C++ processor produces slightly different line markers, we
need to handle this here as well, otherwise the sources/headers would not
be processed to acquire the _get_type and _get_gtype symbols to put in the
introspection dumper sources, producing bad results.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
| |
This reverts commit 7a82752734b496bb619fce62572c0c7f8578350a.
|
|
|
|
|
|
|
|
| |
Update everything.h include the header used to decorate symbols with the
macro for export and everything.c to include config.h first, and have the
symbols decorated with the aforementioned macro.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
|
|
|
|
|
|
| |
New versions of msys2 provide a MINGW64 env variable instead.
https://bugzilla.gnome.org/show_bug.cgi?id=734163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a CCompiler module for the giscanner Python scripts so that items
related to the run of the preprocessor, compiler and linker can be done in
this module, and this marks the beginning of the move of building the
introspection files using Python's distutils.
This patch first moves _add_[internal|external]_link_flags() to
ccompiler.py as get_[internal|external]_link_flags and also moves the
Windows shlibs resolution (deducing the DLLs the introspection files should
link to from the libraries passed in) in shlibs.py to
resolve_windows_libs() in ccompiler.py
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
| |
Use the special os.path.expanduser('~'), as it it more portable, instead of
quering the HOME or HOMEPATH envvar.
https://bugzilla.gnome.org/show_bug.cgi?id=732668
|
|
|
|
|
|
|
|
|
|
| |
On Windows, checking for $(HOME) will work in a MSYS shell but not in
cmd.exe (i.e. Visual Studio command prompt), so we need to check for
HOMEPATH when we are building under a Visual Studio command prompt to get
the users's home directory correctly. This will enable g-ir-doc-tool to
work on Windows when run from cmd.exe.
https://bugzilla.gnome.org/show_bug.cgi?id=732668
|
|
|
|
|
|
|
|
|
| |
Add the command line flag --identifier-filter-cmd to g-ir-scanner which
allows running identifier names through a filtering shell command. The
identifier is sent as stdin to the filter command and expects a filtered
result written to stdout.
https://bugzilla.gnome.org/show_bug.cgi?706898
|
|
|
|
|
| |
Add ANN_NULLABLE and ANN_OPTIONAL in the one (and only) other place that
ANN_ALLOW_NONE is mentioned...
|
|
|
|
|
|
|
| |
Add (nullable) and (optional) as recognised annotations in the same places that
(allow-none) is allowed. This should have been done in the previous
commits but the tests were passing because the only ill effect was that
a warning was issued.
|
|
|
|
|
|
|
| |
This reverts commit 0839e696e9fbc1942ac5c61054de3b47e9578152.
This was accidentally picked up by my 'git bz apply' against the bug as
I was getting ready to push the last set of changes.
|
|
|
|
|
|
|
|
| |
In the case that a parameter has not been explicitly annotated, the
value of node.direction will be None, not 'in'. Instead of comparing as
== 'in' we should therefore check for being != 'out'.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|
|
|
|
|
|
|
|
|
|
| |
Promote the 'nullable' field to the TypeContainer base class (which is
shared by Return and Parameter types).
Add .gir support for nullability on return values, both in the writer
and in the (scanner's) parser.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
|