| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This adds a test for ccompiler.py so that we can test the compiler instance
creation via ccompiler.py (and therefore distutils), so that we can get the
correct compiler instances as we ask for them.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For switching to distutils for generating (preprocessing the various
headers and sources), compiling and linking the dumper sources, we
need to ensure that distutils, in particular the distutils compiler
modules that the various Windows build flavors use, are imported,
so that this will work. The part removed from this file in commit
c9cfa1b was added there as that was a part of the ongoing work to
make g-i more portable across OS's, which sat in BZ for a long, long
time, hoping that things didn't bitrot badly :|
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
| |
Remove mentions about the GCC requirement for building the introspection
files, as that is no longer needed.
https://bugzilla.gnome.org/show_bug.cgi?id=728313
|
|
|
|
|
|
|
|
|
| |
As we are running the preprocessor without using stdin as its input, we can
now drop the MSVC build-time dependency on a MinGW/GCC installation for
introspection files, which means we also don't need to supply definitions
for time_t anymore.
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
|
| |
|
|
|
|
|
|
| |
See https://bugzilla.gnome.org/show_bug.cgi?id=749696
https://bugzilla.gnome.org/show_bug.cgi?id=751978
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Cases where fixed-size has no value and fixed-size has
a non-integer value where not yet tested. Found thanks
to coverage.py
|
|
|
|
|
| |
Updated from:
https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/pep8.py
|
|
|
|
|
| |
Code uses LOG_COMPILER, comment mistakenly still
mentioned TESTS_ENVIRONMENT.
|
|
|
|
|
| |
we already go through 'env' for all other TESTS_ENVIRONMENT
statements, reason to not do so here too...
|
|
|
|
|
| |
"--warn-all --reparse-validate" is already contained in
$(INTROSPECTION_SCANNER_ARGS), no need to repeat
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
... so it lives next to the rest of the maintainer utilities.
|
|
|
|
|
|
| |
g-ir-annotation-tool, g-ir-doc-tool and g-ir-scanner where identical
except for the module and function being invoked.
Avoid code duplication and generate these from a common template.
|
| |
|
|
|
|
|
|
| |
'relocatable' at runtime.
https://bugzilla.gnome.org/show_bug.cgi?id=620566
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Creates .xml.in files in tests/scanner/annotationparser/gtk-doc
which then need to be carefully compared for changes (using your
favorite diff tool) with the .xml files already contained in that
same directory.
https://bugzilla.gnome.org/show_bug.cgi?id=725685
|
|
|
|
|
|
|
|
|
|
| |
"cairo-1.0.gir" is generated into "$(top_builddir)/gir" but
g-ir-scanner is never instructed to look into that directory.
This fails somewhat when there is no system installed copy
of it when VPATH building "tests/scanner/Regress-1.0.gir":
Couldn't find include cairo-1.0.gir (search path: "everything except the correct value")
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
|
| |
Adding "$(top_srcdir)/gir" to XDG_DATA_DIRS is pointless
as scanner/transformer.py actually goes looking for
"$(top_srcdir)/gir/gir-1.0", which doesn't exist.
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
42bb69a6a2f12165a9758b192e80da089e00ab5c introduced a bug causing
test_parser.py and test_patterns.py tests to be executed twice.
This patch fixes this and still allows the tests to be executed:
- using 'make check'
- manually:
PYTHONPATH=. python tests/scanner/annotationparser/test_parser.py
PYTHONPATH=. python tests/scanner/annotationparser/test_patterns.py
- individually:
python -m unittest test_parser.TestGiTag_Stability.test_001
python -m unittest test_patterns.TestCommentAsterisk.test_000
test_parser.py now results in:
Ran 360 tests in 0.172s
instead of:
Ran 720 tests in 0.339s
test_patterns.py now results in:
Ran 213 tests in 0.014s
instead of
Ran 426 tests in 0.041s
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
| |
libfoo was moved into libregress in 9fc6eb16e954559d97cdd9a03437c8b1877c2a1d
libtestinherit was moved into libregress in bb1ac9cf2dc450c5d44b1e39e3162ba06069f4a1
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
|
| |
tests/scanner/annotationparser/test_[parser|patterns].py
stopped working with Python3 somewhere down the line due
to the iteritems() call...
https://bugzilla.gnome.org/show_bug.cgi?id=745636
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Generalize "throws" attribute to SignatureBlob which can be used by all
callable blob types. Keep FunctionBlob and VFuncBlob throw attributes
around and functional for compatibility. Refactor girwriter.c to write
out throws attribute for all callable types.
Based on a patch by Simon Feltman.
https://bugzilla.gnome.org/show_bug.cgi?id=729543
|
|
|
|
| |
Based on a patch by Simon Feltman.
|
|
|
|
|
|
|
|
|
|
|
| |
Add find_field utility function for finding a field info by name.
Beyond convenience, this should be faster than manually using
the get_n_fields and get_field functions because get_field does
an additional iteration for each field to calculate offsets O(n^2).
Thus find_field combines the offset and comparison
computations into a single loop O(n).
Based on a patch by Simon Feltman.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Add missing doc-tool tests, fixes "make distcheck" breakage
introduced by 09daa28c5b4625b6f274b3b340bc85e33bef80b5
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=751150
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=750286
|
| |
|
|
|
|
| |
optparse is deprecated.
|
| |
|