summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests/scanner: Add a test for ccompiler.pywip/fanc999/dumper-distutilsChun-wei Fan2015-07-222-0/+81
| | | | | | | | 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
* dumper.py: Use Distutils to Build Dumper ProgramChun-wei Fan2015-07-222-157/+164
| | | | | | | | | | | | | | | | 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
* sourcescanner.py: Use Distutils for PreprocessingChun-wei Fan2015-07-224-41/+171
| | | | | | | | | | | | | | | | | | 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
* giscanner/ccompiler.py: Initiate Distutils Compiler InstanceChun-wei Fan2015-07-222-78/+106
| | | | | | | | | | | | | | | | | | | | | | | 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
* giscanner/ccompiler.py: Partially Revert c9cfa2bChun-wei Fan2015-07-221-0/+7
| | | | | | | | | | | | | 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
* MSVC Builds: Update README.txt'sChun-wei Fan2015-07-222-27/+5
| | | | | | | 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
* MSVC Builds: Drop GCC RequirementChun-wei Fan2015-07-223-25/+2
| | | | | | | | | 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
* giscanner/sourcescanner.py: Use Tempfiles For ParsingChun-wei Fan2015-07-221-31/+47
| | | | | | | | | | | | | 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
* Update glib annotations from glib 2.45.4Rico Tzschichholz2015-07-211-0/+12
|
* test: Add a test for GList containing GType.Christoph Reiter2015-07-057-0/+146
| | | | | | See https://bugzilla.gnome.org/show_bug.cgi?id=749696 https://bugzilla.gnome.org/show_bug.cgi?id=751978
* Release 2.45.31.45.3Florian Müllner2015-07-031-2/+2
|
* Update glib annotations from git masterRico Tzschichholz2015-07-012-193/+360
|
* Add missing maintainer tools to EXTRA_DISTDieter Verfaillie2015-06-291-1/+4
|
* tests: add missing fixed-size array annotation testsDieter Verfaillie2015-06-291-0/+55
| | | | | | Cases where fixed-size has no value and fixed-size has a non-integer value where not yet tested. Found thanks to coverage.py
* tests: Update misc/pep8.py to 1.6.2Dieter Verfaillie2015-06-299-388/+626
| | | | | Updated from: https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/pep8.py
* tests: fix commentDieter Verfaillie2015-06-291-1/+1
| | | | | Code uses LOG_COMPILER, comment mistakenly still mentioned TESTS_ENVIRONMENT.
* tests: go through 'env' for all TESTS_ENVIRONMENTDieter Verfaillie2015-06-291-1/+1
| | | | | we already go through 'env' for all other TESTS_ENVIRONMENT statements, reason to not do so here too...
* tests: don't repeat --warn-all --reparse-validate argumentsDieter Verfaillie2015-06-292-2/+1
| | | | | "--warn-all --reparse-validate" is already contained in $(INTROSPECTION_SCANNER_ARGS), no need to repeat
* scanner: remove unused importsDieter Verfaillie2015-06-292-7/+1
|
* scanner: remove unused param_namesDieter Verfaillie2015-06-291-2/+0
| | | | | | we haven't been emitting the warning for about six years (see 7dbbda9abea9882d2c98726f382a905fa8738706) so remove the leftovers...
* scanner: fix broken assert messageDieter Verfaillie2015-06-291-1/+1
| | | | | | | | 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.
* scanner: document LibtoolImporter.load_module()Dieter Verfaillie2015-06-291-9/+6
| | | | | | | | | | | | | | | | | | 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
* tools: move verbump.py from tools to misc...Dieter Verfaillie2015-06-292-1/+1
| | | | ... so it lives next to the rest of the maintainer utilities.
* tools: use a template to generate the tools scriptsDieter Verfaillie2015-06-294-128/+10
| | | | | | 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.
* tools: add support for PyDev remote debugger.Dieter Verfaillie2015-06-294-18/+59
|
* tools: make g-ir-annotiotion-tool, g-ir-doc-tool and g-ir-scanner ↵Dieter Verfaillie2015-06-293-51/+33
| | | | | | 'relocatable' at runtime. https://bugzilla.gnome.org/show_bug.cgi?id=620566
* scanner: future-proof cachestore version hashingDieter Verfaillie2015-06-291-2/+1
| | | | | | | 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.
* Add PyDev project files to .gitignoreDieter Verfaillie2015-06-261-0/+5
|
* Add coverage reports to .gitignoreDieter Verfaillie2015-06-261-0/+4
|
* scanner: centralize caret error message handlingDieter Verfaillie2015-06-242-105/+77
| | | | | | | Not doing this manually all over the place makes the code slightly more readable. https://bugzilla.gnome.org/show_bug.cgi?id=689454
* tests: sync with GTK-Doc test suite @ ↵Dieter Verfaillie2015-06-2411-45/+1231
| | | | | | 02e545371e2132a97458888895cacf57b8c0f83a (2015-06-23) https://bugzilla.gnome.org/show_bug.cgi?id=725685
* misc: add tool semi-automating the GTK-Doc test suite update procedureDieter Verfaillie2015-06-241-0/+234
| | | | | | | | | 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
* tests: make sure g-ir-scanner can find cairo-1.0.girDieter Verfaillie2015-06-243-12/+15
| | | | | | | | | | "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
* tests: don't add $(top_srcdir)/gir to XDG_DATA_DIRSDieter Verfaillie2015-06-241-1/+0
| | | | | | | | 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
* tests: execute annotationparser tests just onceDieter Verfaillie2015-06-242-40/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* tests: remove unused test filesDieter Verfaillie2015-06-242-1534/+0
| | | | | | | libfoo was moved into libregress in 9fc6eb16e954559d97cdd9a03437c8b1877c2a1d libtestinherit was moved into libregress in bb1ac9cf2dc450c5d44b1e39e3162ba06069f4a1 https://bugzilla.gnome.org/show_bug.cgi?id=745636
* tests: Python 3 fixesDieter Verfaillie2015-06-242-2/+2
| | | | | | | | 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
* scanner: disable cache in reparse validate modeDieter Verfaillie2015-06-241-1/+1
| | | | | | | | | | | | 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
* girepository: Support GError exceptions on callbacksGarrett Regier2015-06-215-13/+106
| | | | | | | | | | | 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
* tests: Convert gitestthrows to use GTest frameworkGarrett Regier2015-06-211-6/+12
| | | | Based on a patch by Simon Feltman.
* girepository: Add g_struct_info_find_field()Garrett Regier2015-06-215-2/+112
| | | | | | | | | | | 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.
* scanner: add "XDG Base Directory" functionsDieter Verfaillie2015-06-203-48/+100
| | | | | | | | | | | | 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
* scanner: honor XDG_CACHE_HOMEDieter Verfaillie2015-06-201-0/+5
| | | | | | | | 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
* tests: fix make distcheckDieter Verfaillie2015-06-208-0/+204
| | | | | Add missing doc-tool tests, fixes "make distcheck" breakage introduced by 09daa28c5b4625b6f274b3b340bc85e33bef80b5
* Update glib annotationsFlorian Müllner2015-06-193-331/+1105
|
* Add deprecation guards for GSimpleAsyncResult deprecationChristoph Reiter2015-06-191-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=751150
* tests: Add regression test for (transfer full) returning callbacksDebarshi Ray2015-06-182-0/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=750286
* tools: correct python shebangMathieu Duponchelle2015-06-173-3/+3
|
* docmain: port to using argparse.Mathieu Duponchelle2015-06-172-18/+16
| | | | optparse is deprecated.
* Release 1.45.2GOBJECT_INTROSPECTION_1_45_2Rico Tzschichholz2015-05-261-3/+3
|