Commit Graph

427 Commits

Author SHA1 Message Date
John Ralls
474c3ae079 Make a target for the python-bindings test to set its dependencies. 2018-02-18 16:08:26 -08:00
Geert Janssens
36cb167b68 Rewrite gnc_add_swig_python_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
John Ralls
74ddb671e4 Merge Chris Lam's and Aaron Laws's branch 'time64-ftw' into unstable. 2018-01-20 12:40:32 -08:00
John Ralls
91f4b19039 Convert python bindings from timespec to time64. 2018-01-20 12:35:04 -08:00
John Ralls
6ffb77de20 Merge branch Rob Gowin's 'bye_bye_autotools' into unstable. 2018-01-18 12:02:56 -08:00
John Ralls
8900b19da3 Bug 790845 - 2.7.3: massive test failures on some architectures (reopened).
Fix some test failures caused by erroneous size assumptions.
2018-01-14 16:31:22 -08:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
Geert Janssens
f11eab36d9 Replace GNC_CONFIGURE(2) with configure_file 2017-12-23 14:07:25 +01:00
John Ralls
ad11afefb4 LIBDIR is not lib--two more CMakeLists.txt. 2017-12-01 20:31:44 -08:00
John Ralls
4a84fca9b1 Add GLIB_CFLAGS and srcdir to SWIG includes. 2017-11-30 13:32:57 -08:00
John Ralls
41656c920e Fix python test failure on Travis.
It seems that there are two possible exceptions depending on OS.
2017-11-28 17:57:00 -08:00
Guy Taylor
744cdac5a4 Use builtin SWIG conversions for glib types
Where possible in the Python SWIG code use the builtin SWIG conversion
code over custom code. This ensures appropriate overflow/type checking.
With this I have enabled GncNumeric from longs and tested for correct
overflow handling.

Note: This could be extended to GUILE but I am not familiar enought to
safely enable this.
2017-11-28 17:08:43 -08:00
Guy Taylor
e011576e37 Add GncNumeric to native Python Fraction
Add helper method to return the native Python fraction type from GncNumeric.
2017-11-28 16:14:07 -08:00
Guy Taylor
1ef379a704 Fix Python GncNumeric for non (int, int) pairs
At current the Python GncNumeric has issues with type conversion eg.
 * GncNumeric(1.3) = 1.00
 * GncNumeric("1.3") is OK but any future methods error

This behaviour was relied on for the Account tests to pass as it used
GncNumeric(0.5) == GncNumeric(1.0) but this is not what many users would
expect.

This fix alows GncNumeric to be constructed from a (int, int)
numerator/denominator pair or int/float/str where double_to_gnc_numeric
and string_to_gnc_numeric from C is used.
2017-11-28 16:14:07 -08:00
John Ralls
e92a1b3723 Fix python tests in tarball builds. 2017-11-28 14:25:24 -08:00
John Ralls
13657ee1bb Merge branch 'maint' into unstable 2017-11-25 15:35:24 -08:00
John Ralls
961cb5a829 Bug 790550 - FTBFS: missing __init__.py 2017-11-19 17:32:12 -08:00
John Ralls
f888eb88f0 Fix with_Python build in cmake. 2017-11-09 11:22:02 -08:00
Geert Janssens
df8ceadb63 Fix building from dist tarball with python bindings enabled 2017-10-26 14:05:17 +02:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens
37ecf56fbb Merge branch 'maint'
Resolved conflicts:
	bindings/python/tests/CMakeLists.txt
2017-09-12 13:48:01 +02:00
Geert Janssens
f0fe1e9949 Re-enable python-bindings test this time with a fully corrected python path
The fix was suggested by Rob Gowin.
In addition, disable some debug output in the python tests suite.
2017-09-10 11:57:28 +02:00
Geert Janssens
a1bc2d0202 Temporarily disable python-bindings as it's currently failing
I have adjusted the PYTHON_PATH already based on the new directory layout,
but that's not sufficient.
2017-09-09 14:23:47 +02:00
Geert Janssens
22b11427cb Merge branch 'maint' 2017-09-09 14:09:13 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00