From 0cc6662ae53af1bb6d24bdd5c991d41e77d59e7f Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 11:39:28 +0200 Subject: [PATCH 01/36] add setTablesToInclude to Context along with checks that is not set at the same time as tables to skip --- geodiff/src/geodiffcontext.cpp | 29 ++++++++++++-- geodiff/src/geodiffcontext.hpp | 11 ++++++ geodiff/tests/CMakeLists.txt | 1 + geodiff/tests/test_context.cpp | 71 ++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 geodiff/tests/test_context.cpp diff --git a/geodiff/src/geodiffcontext.cpp b/geodiff/src/geodiffcontext.cpp index fc821814..b2cb5b03 100644 --- a/geodiff/src/geodiffcontext.cpp +++ b/geodiff/src/geodiffcontext.cpp @@ -25,17 +25,35 @@ const Logger &Context::logger() const void Context::setTablesToSkip( const std::vector &tablesToSkip ) { + if ( mTablesFilterMode == TablesFilterMode::IncludedTables ) + throw GeoDiffException( "Cannot set tables to skip when tables to include are already set" ); + + mTablesFilterMode = TablesFilterMode::SkippedTables; mTablesToSkip = tablesToSkip; } +void Context::setTablesToInclude( const std::vector &tablesToInclude ) +{ + if ( mTablesFilterMode == TablesFilterMode::SkippedTables ) + throw GeoDiffException( "Cannot set tables to include when tables to skip are already set" ); + + mTablesFilterMode = TablesFilterMode::IncludedTables; + mTablesToInclude = tablesToInclude; +} + bool Context::isTableSkipped( const std::string &tableName ) const { - if ( mTablesToSkip.empty() ) + if ( mTablesFilterMode == TablesFilterMode::IncludedTables ) { - return false; + return std::none_of( mTablesToInclude.begin(), mTablesToInclude.end(), std::bind( std::equal_to(), std::placeholders::_1, tableName ) ); } - return std::any_of( mTablesToSkip.begin(), mTablesToSkip.end(), std::bind( std::equal_to< std::string >(), std::placeholders::_1, tableName ) ); + if ( mTablesFilterMode == TablesFilterMode::SkippedTables ) + { + return std::any_of( mTablesToSkip.begin(), mTablesToSkip.end(), std::bind( std::equal_to(), std::placeholders::_1, tableName ) ); + } + + return false; } void Context::setLastError( const std::string &message ) @@ -47,3 +65,8 @@ const std::string &Context::lastError() const { return mLastError; } + +TablesFilterMode Context::tableFilterMode() const +{ + return mTablesFilterMode; +} diff --git a/geodiff/src/geodiffcontext.hpp b/geodiff/src/geodiffcontext.hpp index 9c805cb5..1fe5e72a 100644 --- a/geodiff/src/geodiffcontext.hpp +++ b/geodiff/src/geodiffcontext.hpp @@ -12,6 +12,13 @@ #include "geodiff.h" #include "geodifflogger.hpp" +enum class TablesFilterMode +{ + Nothing, + IncludedTables, + SkippedTables +}; + class Context { public: @@ -21,14 +28,18 @@ class Context const Logger &logger() const; void setTablesToSkip( const std::vector &tablesToSkip ); + void setTablesToInclude( const std::vector &tablesToInclude ); bool isTableSkipped( const std::string &tableName ) const; void setLastError( const std::string &message ); const std::string &lastError() const; + TablesFilterMode tableFilterMode() const; private: Logger mLogger; std::vector mTablesToSkip; + std::vector mTablesToInclude; std::string mLastError; + TablesFilterMode mTablesFilterMode = TablesFilterMode::Nothing; }; diff --git a/geodiff/tests/CMakeLists.txt b/geodiff/tests/CMakeLists.txt index 537aa734..0b02e9ba 100644 --- a/geodiff/tests/CMakeLists.txt +++ b/geodiff/tests/CMakeLists.txt @@ -70,6 +70,7 @@ ENDMACRO (ADD_GEODIFF_TEST) SET(TESTS test_c_api.cpp test_changeset_reader.cpp + test_context.cpp test_changeset_utils.cpp test_concurrent_commits.cpp test_driver_sqlite.cpp diff --git a/geodiff/tests/test_context.cpp b/geodiff/tests/test_context.cpp new file mode 100644 index 00000000..a83f56c5 --- /dev/null +++ b/geodiff/tests/test_context.cpp @@ -0,0 +1,71 @@ +/* + GEODIFF - MIT License + Copyright (C) 2026 Jan Caha +*/ + +#include "gtest/gtest.h" +#include "geodiffcontext.hpp" +#include "geodiffutils.hpp" + +TEST( ContextTest, defaultFilterModeIsNothing ) +{ + Context ctx; + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); +} + +TEST( ContextTest, setTablesToSkip ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines", "polygons" } ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::SkippedTables ); +} + +TEST( ContextTest, setTablesToInclude ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::IncludedTables ); +} + +TEST( ContextTest, cannotSetIncludeAfterSkip ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines" } ); + EXPECT_THROW( ctx.setTablesToInclude( { "points" } ), GeoDiffException ); +} + +TEST( ContextTest, cannotSetSkipAfterInclude ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + EXPECT_THROW( ctx.setTablesToSkip( { "lines" } ), GeoDiffException ); +} + +TEST( ContextTest, skipModeSkipsListedTable ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines" } ); + EXPECT_TRUE( ctx.isTableSkipped( "lines" ) ); + EXPECT_FALSE( ctx.isTableSkipped( "points" ) ); +} + +TEST( ContextTest, includeModeSkipsUnlistedTable ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + EXPECT_FALSE( ctx.isTableSkipped( "points" ) ); + EXPECT_TRUE( ctx.isTableSkipped( "lines" ) ); +} + +TEST( ContextTest, nothingModeSkipsNothing ) +{ + Context ctx; + EXPECT_FALSE( ctx.isTableSkipped( "points" ) ); + EXPECT_FALSE( ctx.isTableSkipped( "lines" ) ); +} + +int main( int argc, char **argv ) +{ + testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +} From 948fb61b2f2912727b030b78ed11dc07eb1bfc04 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 11:49:56 +0200 Subject: [PATCH 02/36] passing empty array clears the list and sets the TablesFilterMode to Nothing --- geodiff/src/geodiffcontext.cpp | 24 ++++++++++++--- geodiff/tests/test_context.cpp | 54 ++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/geodiff/src/geodiffcontext.cpp b/geodiff/src/geodiffcontext.cpp index b2cb5b03..5f5a4f31 100644 --- a/geodiff/src/geodiffcontext.cpp +++ b/geodiff/src/geodiffcontext.cpp @@ -28,8 +28,16 @@ void Context::setTablesToSkip( const std::vector &tablesToSkip ) if ( mTablesFilterMode == TablesFilterMode::IncludedTables ) throw GeoDiffException( "Cannot set tables to skip when tables to include are already set" ); - mTablesFilterMode = TablesFilterMode::SkippedTables; - mTablesToSkip = tablesToSkip; + if ( tablesToSkip.empty() ) + { + mTablesFilterMode = TablesFilterMode::Nothing; + mTablesToSkip.clear(); + } + else + { + mTablesFilterMode = TablesFilterMode::SkippedTables; + mTablesToSkip = tablesToSkip; + } } void Context::setTablesToInclude( const std::vector &tablesToInclude ) @@ -37,8 +45,16 @@ void Context::setTablesToInclude( const std::vector &tablesToInclud if ( mTablesFilterMode == TablesFilterMode::SkippedTables ) throw GeoDiffException( "Cannot set tables to include when tables to skip are already set" ); - mTablesFilterMode = TablesFilterMode::IncludedTables; - mTablesToInclude = tablesToInclude; + if ( tablesToInclude.empty() ) + { + mTablesFilterMode = TablesFilterMode::Nothing; + mTablesToInclude.clear(); + } + else + { + mTablesFilterMode = TablesFilterMode::IncludedTables; + mTablesToInclude = tablesToInclude; + } } bool Context::isTableSkipped( const std::string &tableName ) const diff --git a/geodiff/tests/test_context.cpp b/geodiff/tests/test_context.cpp index a83f56c5..c1e7cdb0 100644 --- a/geodiff/tests/test_context.cpp +++ b/geodiff/tests/test_context.cpp @@ -64,6 +64,60 @@ TEST( ContextTest, nothingModeSkipsNothing ) EXPECT_FALSE( ctx.isTableSkipped( "lines" ) ); } +TEST( ContextTest, clearSkipByEmptyList ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines" } ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::SkippedTables ); + ctx.setTablesToSkip( {} ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); +} + +TEST( ContextTest, clearIncludeByEmptyList ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::IncludedTables ); + ctx.setTablesToInclude( {} ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); +} + +TEST( ContextTest, canSetIncludeAfterClearingSkip ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines" } ); + ctx.setTablesToSkip( {} ); + EXPECT_NO_THROW( ctx.setTablesToInclude( { "points" } ) ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::IncludedTables ); +} + +TEST( ContextTest, canSetSkipAfterClearingInclude ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + ctx.setTablesToInclude( {} ); + EXPECT_NO_THROW( ctx.setTablesToSkip( { "lines" } ) ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::SkippedTables ); +} + +TEST( ContextTest, clearSkipResetsIsTableSkipped ) +{ + Context ctx; + ctx.setTablesToSkip( { "lines" } ); + EXPECT_TRUE( ctx.isTableSkipped( "lines" ) ); + ctx.setTablesToSkip( {} ); + EXPECT_FALSE( ctx.isTableSkipped( "lines" ) ); +} + +TEST( ContextTest, clearIncludeResetsIsTableSkipped ) +{ + Context ctx; + ctx.setTablesToInclude( { "points" } ); + EXPECT_TRUE( ctx.isTableSkipped( "lines" ) ); + ctx.setTablesToInclude( {} ); + EXPECT_FALSE( ctx.isTableSkipped( "lines" ) ); +} + int main( int argc, char **argv ) { testing::InitGoogleTest( &argc, argv ); From 2c112cd82955516e593d9a9a0e576de5b3e73412 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 11:51:39 +0200 Subject: [PATCH 03/36] rename enum value --- geodiff/src/geodiffcontext.cpp | 4 ++-- geodiff/src/geodiffcontext.hpp | 4 ++-- geodiff/tests/test_context.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/geodiff/src/geodiffcontext.cpp b/geodiff/src/geodiffcontext.cpp index 5f5a4f31..81af8803 100644 --- a/geodiff/src/geodiffcontext.cpp +++ b/geodiff/src/geodiffcontext.cpp @@ -30,7 +30,7 @@ void Context::setTablesToSkip( const std::vector &tablesToSkip ) if ( tablesToSkip.empty() ) { - mTablesFilterMode = TablesFilterMode::Nothing; + mTablesFilterMode = TablesFilterMode::None; mTablesToSkip.clear(); } else @@ -47,7 +47,7 @@ void Context::setTablesToInclude( const std::vector &tablesToInclud if ( tablesToInclude.empty() ) { - mTablesFilterMode = TablesFilterMode::Nothing; + mTablesFilterMode = TablesFilterMode::None; mTablesToInclude.clear(); } else diff --git a/geodiff/src/geodiffcontext.hpp b/geodiff/src/geodiffcontext.hpp index 1fe5e72a..42213d23 100644 --- a/geodiff/src/geodiffcontext.hpp +++ b/geodiff/src/geodiffcontext.hpp @@ -14,7 +14,7 @@ enum class TablesFilterMode { - Nothing, + None, IncludedTables, SkippedTables }; @@ -39,7 +39,7 @@ class Context std::vector mTablesToSkip; std::vector mTablesToInclude; std::string mLastError; - TablesFilterMode mTablesFilterMode = TablesFilterMode::Nothing; + TablesFilterMode mTablesFilterMode = TablesFilterMode::None; }; diff --git a/geodiff/tests/test_context.cpp b/geodiff/tests/test_context.cpp index c1e7cdb0..375002de 100644 --- a/geodiff/tests/test_context.cpp +++ b/geodiff/tests/test_context.cpp @@ -10,7 +10,7 @@ TEST( ContextTest, defaultFilterModeIsNothing ) { Context ctx; - EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::None ); } TEST( ContextTest, setTablesToSkip ) @@ -70,7 +70,7 @@ TEST( ContextTest, clearSkipByEmptyList ) ctx.setTablesToSkip( { "lines" } ); EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::SkippedTables ); ctx.setTablesToSkip( {} ); - EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::None ); } TEST( ContextTest, clearIncludeByEmptyList ) @@ -79,7 +79,7 @@ TEST( ContextTest, clearIncludeByEmptyList ) ctx.setTablesToInclude( { "points" } ); EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::IncludedTables ); ctx.setTablesToInclude( {} ); - EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::Nothing ); + EXPECT_EQ( ctx.tableFilterMode(), TablesFilterMode::None ); } TEST( ContextTest, canSetIncludeAfterClearingSkip ) From ea24f52306cc379e002755b31d1cc54090800aaf Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 11:53:58 +0200 Subject: [PATCH 04/36] add to C interface --- geodiff/src/geodiff.cpp | 24 ++++++++++++++++++++++++ geodiff/src/geodiff.h | 12 ++++++++++++ geodiff/tests/test_c_api.cpp | 2 ++ 3 files changed, 38 insertions(+) diff --git a/geodiff/src/geodiff.cpp b/geodiff/src/geodiff.cpp index ffab38dd..1160fb98 100644 --- a/geodiff/src/geodiff.cpp +++ b/geodiff/src/geodiff.cpp @@ -162,6 +162,30 @@ int GEODIFF_CX_setTablesToSkip( GEODIFF_ContextH contextHandle, int tablesCount, return GEODIFF_SUCCESS; } +int GEODIFF_CX_setTablesToInclude( GEODIFF_ContextH contextHandle, int tablesCount, const char **tablesToInclude ) +{ + Context *context = static_cast( contextHandle ); + if ( !context ) + { + return GEODIFF_ERROR; + } + + if ( tablesCount > 0 && !tablesToInclude ) + { + setAndLogError( context, "NULL arguments to GEODIFF_CX_setTablesToInclude" ); + return GEODIFF_ERROR; + } + + std::vector tables; + for ( int i = 0; i < tablesCount; ++i ) + { + tables.push_back( tablesToInclude[i] ); + } + + context->setTablesToInclude( tables ); + return GEODIFF_SUCCESS; +} + const char *GEODIFF_CX_lastError( GEODIFF_ContextH contextHandle ) { const Context *context = static_cast( contextHandle ); diff --git a/geodiff/src/geodiff.h b/geodiff/src/geodiff.h index 7373ea39..8e8bd938 100644 --- a/geodiff/src/geodiff.h +++ b/geodiff/src/geodiff.h @@ -113,6 +113,18 @@ GEODIFF_EXPORT int GEODIFF_CX_setMaximumLoggerLevel( GEODIFF_ContextH contextHan */ GEODIFF_EXPORT int GEODIFF_CX_setTablesToSkip( GEODIFF_ContextH contextHandle, int tablesCount, const char **tablesToSkip ); +/** + * Set list of tables to include in geodiff operations. Once defined, only these tables + * will be included in the following operations: create changeset, apply changeset, + * rebase, get database schema, dump database contents, copy database between different + * drivers. All other tables will be ignored. + * + * Cannot be used together with GEODIFF_CX_setTablesToSkip on the same context. + * + * If empty list is passed, list will be reset. + */ +GEODIFF_EXPORT int GEODIFF_CX_setTablesToInclude( GEODIFF_ContextH contextHandle, int tablesCount, const char **tablesToInclude ); + /** * Return null-terminated message of last error that occurred using this context. * Consider the pointer invalid after any call to the GeoDiff API. diff --git a/geodiff/tests/test_c_api.cpp b/geodiff/tests/test_c_api.cpp index 09556472..069c9d11 100644 --- a/geodiff/tests/test_c_api.cpp +++ b/geodiff/tests/test_c_api.cpp @@ -25,6 +25,8 @@ TEST( CAPITest, invalid_calls ) ASSERT_EQ( GEODIFF_ERROR, GEODIFF_CX_setMaximumLoggerLevel( invalidContext, GEODIFF_LoggerLevel::LevelWarning ) ); ASSERT_EQ( GEODIFF_ERROR, GEODIFF_CX_setTablesToSkip( invalidContext, 0, nullptr ) ); ASSERT_EQ( GEODIFF_ERROR, GEODIFF_CX_setTablesToSkip( context, 1, nullptr ) ); + ASSERT_EQ( GEODIFF_ERROR, GEODIFF_CX_setTablesToInclude( invalidContext, 0, nullptr ) ); + ASSERT_EQ( GEODIFF_ERROR, GEODIFF_CX_setTablesToInclude( context, 1, nullptr ) ); ASSERT_EQ( GEODIFF_ERROR, GEODIFF_createChangesetEx( invalidContext, "sqlite", nullptr, nullptr, nullptr, nullptr ) ); ASSERT_EQ( GEODIFF_ERROR, GEODIFF_createChangesetEx( context, "sqlite", nullptr, nullptr, nullptr, nullptr ) ); From 4efc407392bed4d98f85cb6f3a963ae4df73875e Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 12:51:49 +0200 Subject: [PATCH 05/36] update cli --- geodiff/src/geodiff-cli.cpp | 116 ++++++++++++++++++++++++++---------- 1 file changed, 84 insertions(+), 32 deletions(-) diff --git a/geodiff/src/geodiff-cli.cpp b/geodiff/src/geodiff-cli.cpp index 76b04f4d..0c109d66 100644 --- a/geodiff/src/geodiff-cli.cpp +++ b/geodiff/src/geodiff-cli.cpp @@ -67,7 +67,7 @@ static bool isOption( const std::string &str ) return str.size() > 0 && str[0] == '-'; } -static bool parseDriverOption( const std::vector &args, size_t &i, const std::string &cmdName, std::string &driverName, std::string &driverOptions, std::string &tablesToSkip ) +static bool parseDriverOption( const std::vector &args, size_t &i, const std::string &cmdName, std::string &driverName, std::string &driverOptions, std::string &tablesToSkip, std::string &tablesToInclude ) { for ( ; i < args.size(); ++i ) { @@ -91,12 +91,23 @@ static bool parseDriverOption( const std::vector &args, size_t &i, if ( i + 1 >= args.size() ) { std::cout << "Error: missing arguments for skip-tables option" << std::endl; - return 1; + return false; } tablesToSkip = args[i + 1]; i += 1; continue; } + else if ( args[i] == "--include-tables" ) + { + if ( i + 1 >= args.size() ) + { + std::cout << "Error: missing arguments for include-tables option" << std::endl; + return false; + } + tablesToInclude = args[i + 1]; + i += 1; + continue; + } else { std::cout << "Error: unknown option '" << args[i] << "' for '" << cmdName << "' command." << std::endl; @@ -130,7 +141,7 @@ static int handleCmdDiff( GEODIFF_ContextH context, const std::vector= args.size() ) + { + std::cout << "Error: missing arguments for include-tables option" << std::endl; + return 1; + } + tablesToInclude = args[i + 1]; + i += 1; + continue; + } else { std::cout << "Error: unknown option '" << args[i] << "' for 'diff' command." << std::endl; @@ -194,10 +216,17 @@ static int handleCmdDiff( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); // parse required arguments if ( !parseRequiredArgument( db1, args, i, "DB_1", "diff" ) ) @@ -307,10 +336,10 @@ static int handleCmdApply( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); int ret = GEODIFF_applyChangesetEx( context, driverName.data(), driverOptions.data(), db.data(), changeset.data() ); if ( ret != GEODIFF_SUCCESS ) @@ -342,10 +373,10 @@ static int handleCmdRebaseDiff( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); int ret = GEODIFF_createRebasedChangesetEx( context, @@ -386,10 +419,10 @@ static int handleCmdRebaseDb( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); int ret = GEODIFF_rebaseEx( context, driverName.data(), driverOptions.data(), dbBase.data(), dbOur.data(), @@ -581,7 +615,7 @@ static int handleCmdCopy( GEODIFF_ContextH context, const std::vector= args.size() ) + { + std::cout << "Error: missing arguments for include-tables option" << std::endl; + return 1; + } + tablesToInclude = args[i + 1]; + i += 1; + continue; } else { @@ -634,14 +680,16 @@ static int handleCmdCopy( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); if ( driver1Name == "sqlite" && driver2Name == "sqlite" ) { - if ( !tablesToSkip.empty() ) + if ( !tablesToSkip.empty() || !tablesToInclude.empty() ) { - std::cout << "Source and destination drivers are \"sqlite\". Option \"--skip-tables\" will be ignored." << std::endl; + std::cout << "Source and destination drivers are \"sqlite\". Table filter options will be ignored." << std::endl; return 1; } @@ -675,10 +723,10 @@ static int handleCmdSchema( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); std::string json; TmpFile tmpJson; @@ -735,10 +785,10 @@ static int handleCmdDump( GEODIFF_ContextH context, const std::vector( context ); - std::vector tables = parseIgnoredTables( tablesToSkip ); - ctx->setTablesToSkip( tables ); + if ( !tablesToSkip.empty() ) + ctx->setTablesToSkip( parseIgnoredTables( tablesToSkip ) ); + else if ( !tablesToInclude.empty() ) + ctx->setTablesToInclude( parseIgnoredTables( tablesToInclude ) ); int ret = GEODIFF_dumpData( context, driverName.data(), driverOptions.data(), db.data(), chOutput.data() ); if ( ret != GEODIFF_SUCCESS ) From 23e3d831b07691dab080c32510f85c8e157cf814 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 13:10:27 +0200 Subject: [PATCH 06/36] add include tables to python API --- pygeodiff/geodifflib.py | 9 +++++++++ pygeodiff/main.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/pygeodiff/geodifflib.py b/pygeodiff/geodifflib.py index bf9af7be..f7524669 100644 --- a/pygeodiff/geodifflib.py +++ b/pygeodiff/geodifflib.py @@ -252,6 +252,15 @@ def set_tables_to_skip(self, context, tables): ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr ) + def set_tables_to_include(self, context, tables): + arr = (ctypes.c_char_p * len(tables))() + for i in range(len(tables)): + arr[i] = tables[i].encode("utf-8") + + self.lib.GEODIFF_CX_setTablesToInclude( + ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr + ) + def version(self): func = self.lib.GEODIFF_version func.restype = ctypes.c_char_p diff --git a/pygeodiff/main.py b/pygeodiff/main.py index 687a60c5..16bee442 100644 --- a/pygeodiff/main.py +++ b/pygeodiff/main.py @@ -81,10 +81,24 @@ def set_tables_to_skip(self, tables): database between different drivers. If empty list is passed, skip tables list will be reset. + Cannot be used together with set_tables_to_include on the same context. """ self._lazy_load() return self.clib.set_tables_to_skip(self.context, tables) + def set_tables_to_include(self, tables): + """ + Set list of tables to include in geodiff operations. Once defined, only + these tables will be included in the following operations: create changeset, + apply changeset, rebase, get database schema, dump database contents, copy + database between different drivers. All other tables will be ignored. + + If empty list is passed, include tables list will be reset. + Cannot be used together with set_tables_to_skip on the same context. + """ + self._lazy_load() + return self.clib.set_tables_to_include(self.context, tables) + LevelError = 1 LevelWarning = 2 LevelInfo = 3 From 7d078fca25788a4b7e07dc7efa4abd0b789ac9f3 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 13:49:10 +0200 Subject: [PATCH 07/36] add tests --- pygeodiff/tests/test_skip_tables.py | 80 +++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/pygeodiff/tests/test_skip_tables.py b/pygeodiff/tests/test_skip_tables.py index 53fe750a..d07845de 100644 --- a/pygeodiff/tests/test_skip_tables.py +++ b/pygeodiff/tests/test_skip_tables.py @@ -99,3 +99,83 @@ def test_skip_apply(self): check_nchanges(self.geodiff, changeset2, 0) self.geodiff.set_tables_to_skip([]) + + def test_include_create(self): + base = geodiff_test_dir() + "/" + "skip_tables" + "/" + "base.gpkg" + modified = geodiff_test_dir() + "/" + "skip_tables" + "/" + "modified_all.gpkg" + changeset = tmpdir() + "/py" + "test_include_create" + "/" + "changeset_points.bin" + changeset2 = ( + tmpdir() + "/py" + "test_include_create" + "/" + "changeset_points2.bin" + ) + changeset_inv = ( + tmpdir() + "/py" + "test_include_create" + "/" + "changeset_inv.bin" + ) + patched = tmpdir() + "/py" + "test_include_create" + "/" + "patched_points.gpkg" + + create_dir("test_include_create") + + # include only points table when creating changeset (lines changes are ignored) + self.geodiff.set_tables_to_include(["points"]) + + # create changeset + self.geodiff.create_changeset(base, modified, changeset) + check_nchanges(self.geodiff, changeset, 4) + + # apply changeset + shutil.copyfile(base, patched) + self.geodiff.apply_changeset(patched, changeset) + + # check that now it is same file (for included tables) + self.geodiff.create_changeset(patched, modified, changeset2) + check_nchanges(self.geodiff, changeset2, 0) + + # check we can create inverted changeset + os.remove(changeset2) + self.geodiff.invert_changeset(changeset, changeset_inv) + self.geodiff.apply_changeset(patched, changeset_inv) + self.geodiff.create_changeset_dr( + "sqlite", "", patched, "sqlite", "", base, changeset2 + ) + check_nchanges(self.geodiff, changeset2, 0) + + self.geodiff.set_tables_to_include([]) + + def test_include_apply(self): + base = geodiff_test_dir() + "/" + "skip_tables" + "/" + "base.gpkg" + modified = geodiff_test_dir() + "/" + "skip_tables" + "/" + "modified_all.gpkg" + changeset = tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_points.bin" + changeset2 = ( + tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_points2.bin" + ) + changeset_inv = ( + tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_inv.bin" + ) + patched = tmpdir() + "/py" + "test_include_apply" + "/" + "patched_points.gpkg" + + create_dir("test_include_apply") + + # create changeset without filter (captures all 6 changes) + self.geodiff.create_changeset(base, modified, changeset) + check_nchanges(self.geodiff, changeset, 6) + + # include only points table when applying changeset + self.geodiff.set_tables_to_include(["points"]) + + # apply changeset + shutil.copyfile(base, patched) + self.geodiff.apply_changeset(patched, changeset) + + # check that now it is same file (for included tables) + self.geodiff.create_changeset(patched, modified, changeset2) + check_nchanges(self.geodiff, changeset2, 0) + + # check we can create inverted changeset + os.remove(changeset2) + self.geodiff.invert_changeset(changeset, changeset_inv) + self.geodiff.apply_changeset(patched, changeset_inv) + self.geodiff.create_changeset_dr( + "sqlite", "", patched, "sqlite", "", base, changeset2 + ) + check_nchanges(self.geodiff, changeset2, 0) + + self.geodiff.set_tables_to_include([]) \ No newline at end of file From c536deb6d626fb9cbf38a7a56341158fc724411c Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 13:58:15 +0200 Subject: [PATCH 08/36] black --- pygeodiff/tests/test_skip_tables.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pygeodiff/tests/test_skip_tables.py b/pygeodiff/tests/test_skip_tables.py index d07845de..2a0a1fe1 100644 --- a/pygeodiff/tests/test_skip_tables.py +++ b/pygeodiff/tests/test_skip_tables.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ - :copyright: (c) 2022 Alexander Bruy - :license: MIT, see LICENSE for more details. +:copyright: (c) 2022 Alexander Bruy +:license: MIT, see LICENSE for more details. """ import os @@ -103,7 +103,9 @@ def test_skip_apply(self): def test_include_create(self): base = geodiff_test_dir() + "/" + "skip_tables" + "/" + "base.gpkg" modified = geodiff_test_dir() + "/" + "skip_tables" + "/" + "modified_all.gpkg" - changeset = tmpdir() + "/py" + "test_include_create" + "/" + "changeset_points.bin" + changeset = ( + tmpdir() + "/py" + "test_include_create" + "/" + "changeset_points.bin" + ) changeset2 = ( tmpdir() + "/py" + "test_include_create" + "/" + "changeset_points2.bin" ) @@ -143,7 +145,9 @@ def test_include_create(self): def test_include_apply(self): base = geodiff_test_dir() + "/" + "skip_tables" + "/" + "base.gpkg" modified = geodiff_test_dir() + "/" + "skip_tables" + "/" + "modified_all.gpkg" - changeset = tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_points.bin" + changeset = ( + tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_points.bin" + ) changeset2 = ( tmpdir() + "/py" + "test_include_apply" + "/" + "changeset_points2.bin" ) @@ -178,4 +182,4 @@ def test_include_apply(self): ) check_nchanges(self.geodiff, changeset2, 0) - self.geodiff.set_tables_to_include([]) \ No newline at end of file + self.geodiff.set_tables_to_include([]) From 22bb793541bbeb7bb742af3f2c538a5bf9d6452b Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 14:21:06 +0200 Subject: [PATCH 09/36] fix ci --- .github/workflows/win_tests.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/win_tests.yml b/.github/workflows/win_tests.yml index f7587a64..9ac27280 100644 --- a/.github/workflows/win_tests.yml +++ b/.github/workflows/win_tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: windows-2025 steps: - name: Checkout Geodiff - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: install deps run: | @@ -19,11 +19,6 @@ jobs: C:/vcpkg/vcpkg integrate install dir "C:/vcpkg/installed/x64-windows/bin" - - name: set compiler environment - shell: cmd - run: | - CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 - - name: build geodiff shell: pwsh run: | From d03073edf73efc1a51a7c5003ed65ae5038cca88 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 14:28:51 +0200 Subject: [PATCH 10/36] try update visual studio --- .github/workflows/win_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win_tests.yml b/.github/workflows/win_tests.yml index 9ac27280..37aa6219 100644 --- a/.github/workflows/win_tests.yml +++ b/.github/workflows/win_tests.yml @@ -32,7 +32,7 @@ jobs: cd $env:GITHUB_WORKSPACE mkdir build cd build - exec { cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_TESTS=ON -DWITH_POSTGRESQL=FALSE ../geodiff } + exec { cmake -G "Visual Studio 18 2026" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_TESTS=ON -DWITH_POSTGRESQL=FALSE ../geodiff } exec { cmake --build . --config Debug } - name: Run tests From dda639616884ca9aa1782673dd37c36d74d26629 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 14:36:20 +0200 Subject: [PATCH 11/36] update visual studio generator --- .github/workflows/python_packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index ade22051..fb8fe8ef 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -59,7 +59,7 @@ jobs: name: Build wheels on Windows runs-on: windows-2025 env: - CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR: "Visual Studio 18 2026" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" @@ -92,7 +92,7 @@ jobs: name: Build 32bit wheels on Windows runs-on: windows-2025 env: - CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR: "Visual Studio 18 2026" CMAKE_GENERATOR_PLATFORM: "Win32" SQLite3_ROOT: "C:/vcpkg/installed/x86-windows" CIBW_SKIP: pp* *-win_amd64 From 785183cd0742122b83cc9a976e44832f15a59218 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 14:45:55 +0200 Subject: [PATCH 12/36] drop unnecessary AWin32 parameter --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index 6c7d9a2d..79048324 100755 --- a/setup.py +++ b/setup.py @@ -15,10 +15,6 @@ '-DPYGEODIFFVERSION='+str(VERSION) ] -arch = platform.architecture()[0] # 64bit or 32bit -if ('Windows' in platform.system()) and ("32" in arch): - cmake_args.append('-AWin32') - setup( name="pygeodiff", version=VERSION, From 3de20c312c83996e48857dbe617a99bde207d7ce Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 14:59:07 +0200 Subject: [PATCH 13/36] fix settings --- .github/workflows/python_packages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index fb8fe8ef..dfcc1a05 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -95,9 +95,10 @@ jobs: CMAKE_GENERATOR: "Visual Studio 18 2026" CMAKE_GENERATOR_PLATFORM: "Win32" SQLite3_ROOT: "C:/vcpkg/installed/x86-windows" - CIBW_SKIP: pp* *-win_amd64 + CIBW_ARCHS_WINDOWS: x86 CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" + CIBW_CONFIG_SETTINGS_WINDOWS: "cmake.define.CMAKE_GENERATOR_PLATFORM=Win32" steps: - uses: actions/checkout@v3 From 93b8e5b6b81617e875e4449e277ff3bedcf501b0 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 15:07:35 +0200 Subject: [PATCH 14/36] add parameter --- .github/workflows/python_packages.yml | 110 ++++++++++++++------------ 1 file changed, 59 insertions(+), 51 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index dfcc1a05..0b4097af 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -15,17 +15,17 @@ jobs: CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-manylinux_2_28 @@ -40,17 +40,17 @@ jobs: CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-musllinux_x86_64 @@ -66,12 +66,12 @@ jobs: CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Install Deps run: | @@ -83,7 +83,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-windows @@ -98,15 +98,15 @@ jobs: CIBW_ARCHS_WINDOWS: x86 CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" - CIBW_CONFIG_SETTINGS_WINDOWS: "cmake.define.CMAKE_GENERATOR_PLATFORM=Win32" + CIBW_CONFIG_SETTINGS_WINDOWS: "cmake.define.CMAKE_GENERATOR_PLATFORM=Win32;cmake.args=-A Win32" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" architecture: x86 - name: Install Deps @@ -119,7 +119,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-windows_32 @@ -128,24 +128,24 @@ jobs: name: Build wheels on macos-15 (arm64) runs-on: macos-15 env: - SQLite3_ROOT: ${{ github.workspace }}/libs - MACOSX_DEPLOYMENT_TARGET: '14.0' - CIBW_SKIP: "" - CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" - CIBW_BEFORE_ALL: > - wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && - tar -xzvf sqlite-autoconf-3460100.tar.gz && - cd sqlite-autoconf-3460100 && - CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && - make install + SQLite3_ROOT: ${{ github.workspace }}/libs + MACOSX_DEPLOYMENT_TARGET: "14.0" + CIBW_SKIP: "" + CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" + CIBW_BEFORE_ALL: > + wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && + tar -xzvf sqlite-autoconf-3460100.tar.gz && + cd sqlite-autoconf-3460100 && + CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && + make install steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Install Deps run: | @@ -154,7 +154,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-macos_arm64 @@ -163,24 +163,24 @@ jobs: name: Build wheels on macos-15 (Intel) runs-on: macos-15-intel env: - SQLite3_ROOT: ${{ github.workspace }}/libs - MACOSX_DEPLOYMENT_TARGET: '10.9' - CIBW_SKIP: "" - CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" - CIBW_BEFORE_ALL: > - wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && - tar -xzvf sqlite-autoconf-3460100.tar.gz && - cd sqlite-autoconf-3460100 && - CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && - make install + SQLite3_ROOT: ${{ github.workspace }}/libs + MACOSX_DEPLOYMENT_TARGET: "10.9" + CIBW_SKIP: "" + CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" + CIBW_BEFORE_ALL: > + wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && + tar -xzvf sqlite-autoconf-3460100.tar.gz && + cd sqlite-autoconf-3460100 && + CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && + make install steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Install Deps run: | @@ -189,7 +189,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: ./wheelhouse/*.whl name: dist-macos @@ -198,12 +198,12 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 name: Install Python with: - python-version: '3.9' + python-version: "3.9" - name: Install deps run: | @@ -213,17 +213,25 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: path: dist/*.tar.gz name: dist-source upload_pypi: - needs: [build_windows_wheels, build_linux_wheels_manylinux_2_28, build_linux_wheels_musllinux_x86_64, build_macos_wheels, build_macos_arm64_wheels, build_sdist] + needs: + [ + build_windows_wheels, + build_linux_wheels_manylinux_2_28, + build_linux_wheels_musllinux_x86_64, + build_macos_wheels, + build_macos_arm64_wheels, + build_sdist, + ] runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: pattern: dist-* merge-multiple: true From 4f1593c8d88a421a6e36ebe698b2935b0a209b75 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 21:41:48 +0200 Subject: [PATCH 15/36] bring back old python packaging only update visual stuido to 18 --- .github/workflows/python_packages.yml | 47 +++++++++++++-------------- setup.py | 4 +++ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 0b4097af..4350b5c0 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -15,9 +15,9 @@ jobs: CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -25,7 +25,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-manylinux_2_28 @@ -40,9 +40,9 @@ jobs: CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -50,7 +50,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-musllinux_x86_64 @@ -66,9 +66,9 @@ jobs: CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -83,7 +83,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-windows @@ -95,15 +95,14 @@ jobs: CMAKE_GENERATOR: "Visual Studio 18 2026" CMAKE_GENERATOR_PLATFORM: "Win32" SQLite3_ROOT: "C:/vcpkg/installed/x86-windows" - CIBW_ARCHS_WINDOWS: x86 + CIBW_SKIP: pp* *-win_amd64 CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" - CIBW_CONFIG_SETTINGS_WINDOWS: "cmake.define.CMAKE_GENERATOR_PLATFORM=Win32;cmake.args=-A Win32" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -119,7 +118,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-windows_32 @@ -140,9 +139,9 @@ jobs: make install steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -154,7 +153,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-macos_arm64 @@ -175,9 +174,9 @@ jobs: make install steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -189,7 +188,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl name: dist-macos @@ -198,9 +197,9 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" @@ -213,7 +212,7 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v7 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz name: dist-source @@ -231,7 +230,7 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: - - uses: actions/download-artifact@v8 + - uses: actions/download-artifact@v4 with: pattern: dist-* merge-multiple: true diff --git a/setup.py b/setup.py index 79048324..6c7d9a2d 100755 --- a/setup.py +++ b/setup.py @@ -15,6 +15,10 @@ '-DPYGEODIFFVERSION='+str(VERSION) ] +arch = platform.architecture()[0] # 64bit or 32bit +if ('Windows' in platform.system()) and ("32" in arch): + cmake_args.append('-AWin32') + setup( name="pygeodiff", version=VERSION, From f7abc049add19e0088e7d771e1eb2aed985f1d81 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Thu, 11 Jun 2026 21:45:57 +0200 Subject: [PATCH 16/36] just update generator --- .github/workflows/python_packages.yml | 64 ++++++++++++--------------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 4350b5c0..fb8fe8ef 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 @@ -45,7 +45,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Install Deps run: | @@ -105,7 +105,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' architecture: x86 - name: Install Deps @@ -127,16 +127,16 @@ jobs: name: Build wheels on macos-15 (arm64) runs-on: macos-15 env: - SQLite3_ROOT: ${{ github.workspace }}/libs - MACOSX_DEPLOYMENT_TARGET: "14.0" - CIBW_SKIP: "" - CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" - CIBW_BEFORE_ALL: > - wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && - tar -xzvf sqlite-autoconf-3460100.tar.gz && - cd sqlite-autoconf-3460100 && - CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && - make install + SQLite3_ROOT: ${{ github.workspace }}/libs + MACOSX_DEPLOYMENT_TARGET: '14.0' + CIBW_SKIP: "" + CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" + CIBW_BEFORE_ALL: > + wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && + tar -xzvf sqlite-autoconf-3460100.tar.gz && + cd sqlite-autoconf-3460100 && + CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && + make install steps: - uses: actions/checkout@v3 @@ -144,7 +144,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Install Deps run: | @@ -162,16 +162,16 @@ jobs: name: Build wheels on macos-15 (Intel) runs-on: macos-15-intel env: - SQLite3_ROOT: ${{ github.workspace }}/libs - MACOSX_DEPLOYMENT_TARGET: "10.9" - CIBW_SKIP: "" - CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" - CIBW_BEFORE_ALL: > - wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && - tar -xzvf sqlite-autoconf-3460100.tar.gz && - cd sqlite-autoconf-3460100 && - CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && - make install + SQLite3_ROOT: ${{ github.workspace }}/libs + MACOSX_DEPLOYMENT_TARGET: '10.9' + CIBW_SKIP: "" + CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" + CIBW_BEFORE_ALL: > + wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz && + tar -xzvf sqlite-autoconf-3460100.tar.gz && + cd sqlite-autoconf-3460100 && + CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ && + make install steps: - uses: actions/checkout@v3 @@ -179,7 +179,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Install Deps run: | @@ -202,7 +202,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: "3.9" + python-version: '3.9' - name: Install deps run: | @@ -218,15 +218,7 @@ jobs: name: dist-source upload_pypi: - needs: - [ - build_windows_wheels, - build_linux_wheels_manylinux_2_28, - build_linux_wheels_musllinux_x86_64, - build_macos_wheels, - build_macos_arm64_wheels, - build_sdist, - ] + needs: [build_windows_wheels, build_linux_wheels_manylinux_2_28, build_linux_wheels_musllinux_x86_64, build_macos_wheels, build_macos_arm64_wheels, build_sdist] runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') steps: From 89a5b012f357d4f8585b3f5fb5e83ae78bf57099 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Fri, 26 Jun 2026 11:47:34 +0200 Subject: [PATCH 17/36] bump version --- geodiff/src/geodiff.cpp | 2 +- pygeodiff/__about__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geodiff/src/geodiff.cpp b/geodiff/src/geodiff.cpp index 1160fb98..4dd42dd2 100644 --- a/geodiff/src/geodiff.cpp +++ b/geodiff/src/geodiff.cpp @@ -54,7 +54,7 @@ static int handleException( Context *context, const GeoDiffException &exc ) // use scripts/update_version.py to update the version here and in other places at once const char *GEODIFF_version() { - return "2.2.0"; + return "2.3.0"; } int GEODIFF_driverCount( GEODIFF_ContextH /*contextHandle*/ ) diff --git a/pygeodiff/__about__.py b/pygeodiff/__about__.py index ebbe9a81..a78226bd 100644 --- a/pygeodiff/__about__.py +++ b/pygeodiff/__about__.py @@ -2,7 +2,7 @@ __description__ = "Diff tool for geo-spatial data" __url__ = "https://github.com/MerginMaps/geodiff" # use scripts/update_version.py to update the version here and in other places at once -__version__ = "2.2.0" +__version__ = "2.3.0" __author__ = "Lutra Consulting Ltd." __author_email__ = "info@merginmaps.com" __maintainer__ = "Lutra Consulting Ltd." diff --git a/setup.py b/setup.py index 6c7d9a2d..43011983 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ import platform # use scripts/update_version.py to update the version here and in other places at once -VERSION = "2.2.0" +VERSION = "2.3.0" cmake_args = [ '-DENABLE_TESTS:BOOL=OFF', From a9894325808955cddc446d760d43a6fd4814b4a0 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Fri, 26 Jun 2026 13:37:33 +0200 Subject: [PATCH 18/36] properly handle the error and its passsing to pygeodiff --- geodiff/src/geodiff.cpp | 18 ++++++++++++++++-- pygeodiff/geodifflib.py | 14 ++++++++------ pygeodiff/tests/test_skip_tables.py | 12 ++++++++++++ 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/geodiff/src/geodiff.cpp b/geodiff/src/geodiff.cpp index 4dd42dd2..3981e2c3 100644 --- a/geodiff/src/geodiff.cpp +++ b/geodiff/src/geodiff.cpp @@ -158,7 +158,14 @@ int GEODIFF_CX_setTablesToSkip( GEODIFF_ContextH contextHandle, int tablesCount, tables.push_back( tableName ); } - context->setTablesToSkip( tables ); + try + { + context->setTablesToSkip( tables ); + } + catch ( const GeoDiffException &exc ) + { + return handleException( context, exc ); + } return GEODIFF_SUCCESS; } @@ -182,7 +189,14 @@ int GEODIFF_CX_setTablesToInclude( GEODIFF_ContextH contextHandle, int tablesCou tables.push_back( tablesToInclude[i] ); } - context->setTablesToInclude( tables ); + try + { + context->setTablesToInclude( tables ); + } + catch ( const GeoDiffException &exc ) + { + return handleException( context, exc ); + } return GEODIFF_SUCCESS; } diff --git a/pygeodiff/geodifflib.py b/pygeodiff/geodifflib.py index f7524669..68fd7137 100644 --- a/pygeodiff/geodifflib.py +++ b/pygeodiff/geodifflib.py @@ -248,18 +248,20 @@ def set_tables_to_skip(self, context, tables): for i in range(len(tables)): arr[i] = tables[i].encode("utf-8") - self.lib.GEODIFF_CX_setTablesToSkip( - ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr - ) + func = self.lib.GEODIFF_CX_setTablesToSkip + func.restype = ctypes.c_int + rc = func(ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr) + self._parse_return_code(context, rc, "set_tables_to_skip") def set_tables_to_include(self, context, tables): arr = (ctypes.c_char_p * len(tables))() for i in range(len(tables)): arr[i] = tables[i].encode("utf-8") - self.lib.GEODIFF_CX_setTablesToInclude( - ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr - ) + func = self.lib.GEODIFF_CX_setTablesToInclude + func.restype = ctypes.c_int + rc = func(ctypes.c_void_p(context), ctypes.c_int(len(tables)), arr) + self._parse_return_code(context, rc, "set_tables_to_include") def version(self): func = self.lib.GEODIFF_version diff --git a/pygeodiff/tests/test_skip_tables.py b/pygeodiff/tests/test_skip_tables.py index 2a0a1fe1..a4cbec7e 100644 --- a/pygeodiff/tests/test_skip_tables.py +++ b/pygeodiff/tests/test_skip_tables.py @@ -13,6 +13,7 @@ geodiff_test_dir, tmpdir, ) +from pygeodiff import GeoDiffLibError class UnitTestsPythonSingleCommit(GeoDiffTests): @@ -183,3 +184,14 @@ def test_include_apply(self): check_nchanges(self.geodiff, changeset2, 0) self.geodiff.set_tables_to_include([]) + + def test_skip_and_include_raises_error(self): + with self.assertRaises(GeoDiffLibError): + self.geodiff.set_tables_to_skip(["lines"]) + self.geodiff.set_tables_to_include(["points"]) + + def test_include_and_skip_raises_error(self): + with self.assertRaises(GeoDiffLibError): + self.geodiff.set_tables_to_include(["points"]) + self.geodiff.set_tables_to_skip(["lines"]) + From 6afa022a65750bf5f3de491b7c4a96779c137acd Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Fri, 26 Jun 2026 13:51:44 +0200 Subject: [PATCH 19/36] black --- pygeodiff/tests/test_skip_tables.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pygeodiff/tests/test_skip_tables.py b/pygeodiff/tests/test_skip_tables.py index a4cbec7e..a9046d0f 100644 --- a/pygeodiff/tests/test_skip_tables.py +++ b/pygeodiff/tests/test_skip_tables.py @@ -194,4 +194,3 @@ def test_include_and_skip_raises_error(self): with self.assertRaises(GeoDiffLibError): self.geodiff.set_tables_to_include(["points"]) self.geodiff.set_tables_to_skip(["lines"]) - From 92703156260f18427801083957d4f5b32048cdd8 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:01:42 +0200 Subject: [PATCH 20/36] update docstring --- geodiff/src/geodiff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geodiff/src/geodiff.h b/geodiff/src/geodiff.h index 8e8bd938..ccde9791 100644 --- a/geodiff/src/geodiff.h +++ b/geodiff/src/geodiff.h @@ -108,6 +108,8 @@ GEODIFF_EXPORT int GEODIFF_CX_setMaximumLoggerLevel( GEODIFF_ContextH contextHan * will be excluded from the following operations: create changeset, apply changeset, * rebase, get database schema, dump database contents, copy database between different * drivers. + * + * Cannot be used together with GEODIFF_CX_setTablesToInclude on the same context. * * If empty list is passed, list will be reset. */ From dfdd320a4e2d969ff74c4aec1e641309b78b53a4 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:01:51 +0200 Subject: [PATCH 21/36] update help --- geodiff/src/geodiff-cli.cpp | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/geodiff/src/geodiff-cli.cpp b/geodiff/src/geodiff-cli.cpp index 0c109d66..04da32fd 100644 --- a/geodiff/src/geodiff-cli.cpp +++ b/geodiff/src/geodiff-cli.cpp @@ -893,7 +893,10 @@ Create and apply changesets (diffs):\n\ creation of changesets across datasets in two different drivers.\n\ --skip-tables TABLES\n\ Ignore specified tables when creating a changeset. Tables are defined as\n\ - a semicolon separated list of names.\n\ + a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when creating a changeset. Tables are defined\n\ + as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ geodiff apply [OPTIONS...] DB CH_INPUT\n\ \n\ @@ -906,7 +909,10 @@ Create and apply changesets (diffs):\n\ database. Driver-specific options are provided in CONN_OPTIONS.\n\ --skip-tables TABLES\n\ Ignore specified tables when applying a changeset. Tables are defined as\n\ - a semicolon separated list of names.\n\ + a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when applying a changeset. Tables are defined\n\ + as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ Rebasing:\n\ \n\ @@ -927,7 +933,10 @@ Rebasing:\n\ databases. Driver-specific options are provided in CONN_OPTIONS.\n\ --skip-tables TABLES\n\ Ignore specified tables when creating a rebased changeset. Tables are\n\ - defined as a semicolon separated list of names.\n\ + defined as a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when creating a rebased changeset. Tables are\n\ + defined as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ geodiff rebase-db [OPTIONS...] DB_BASE DB_OUR CH_BASE_THEIR CONFLICT\n\ \n\ @@ -944,7 +953,10 @@ Rebasing:\n\ databases. Driver-specific options are provided in CONN_OPTIONS.\n\ --skip-tables TABLES\n\ Ignore specified tables when rebasing. Tables are defined as\n\ - a semicolon separated list of names.\n\ + a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when rebasing. Tables are defined as\n\ + a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ Utilities:\n\ \n\ @@ -986,7 +998,10 @@ Utilities:\n\ creation of changesets across datasets in two different drivers.\n\ --skip-tables TABLES\n\ Ignore specified tables when copying the database. Tables are defined\n\ - as a semicolon separated list of names.\n\ + as a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when copying the database. Tables are defined\n\ + as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ geodiff schema [OPTIONS...] DB [SCHEMA_JSON]\n\ \n\ @@ -1000,7 +1015,10 @@ Utilities:\n\ database. Driver-specific options are provided in CONN_OPTIONS.\n\ --skip-tables TABLES\n\ Ignore specified tables when writing a schema. Tables are defined\n\ - as a semicolon separated list of names.\n\ + as a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when writing a schema. Tables are defined\n\ + as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ geodiff dump [OPTIONS...] DB CH_OUTPUT\n\ \n\ @@ -1012,7 +1030,10 @@ Utilities:\n\ database. Driver-specific options are provided in CONN_OPTIONS.\n\ --skip-tables TABLES\n\ Ignore specified tables when dumping the database content. Tables\n\ - are defined a semicolon separated list of names.\n\ + are defined as a semicolon separated list of names. Cannot be used with --include-tables.\n\ + --include-tables TABLES\n\ + Only include specified tables when dumping the database content. Tables\n\ + are defined as a semicolon separated list of names. Cannot be used with --skip-tables.\n\ \n\ geodiff drivers\n\ \n\ From da685cf302494110a7a4ab927b91332c3917b3ae Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:06:45 +0200 Subject: [PATCH 22/36] fix --- geodiff/src/geodiff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geodiff/src/geodiff.h b/geodiff/src/geodiff.h index ccde9791..885c2bd8 100644 --- a/geodiff/src/geodiff.h +++ b/geodiff/src/geodiff.h @@ -108,7 +108,7 @@ GEODIFF_EXPORT int GEODIFF_CX_setMaximumLoggerLevel( GEODIFF_ContextH contextHan * will be excluded from the following operations: create changeset, apply changeset, * rebase, get database schema, dump database contents, copy database between different * drivers. - * + * * Cannot be used together with GEODIFF_CX_setTablesToInclude on the same context. * * If empty list is passed, list will be reset. From 47f135c537b1fc537e3aa7654298a77cce86d19a Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:10:19 +0200 Subject: [PATCH 23/36] drop windows 32 bit wheels --- .github/workflows/python_packages.yml | 35 --------------------------- 1 file changed, 35 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index fb8fe8ef..512c5a27 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -88,41 +88,6 @@ jobs: path: ./wheelhouse/*.whl name: dist-windows - build_windows_32_wheels: - name: Build 32bit wheels on Windows - runs-on: windows-2025 - env: - CMAKE_GENERATOR: "Visual Studio 18 2026" - CMAKE_GENERATOR_PLATFORM: "Win32" - SQLite3_ROOT: "C:/vcpkg/installed/x86-windows" - CIBW_SKIP: pp* *-win_amd64 - CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" - CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v3 - name: Install Python - with: - python-version: '3.9' - architecture: x86 - - - name: Install Deps - run: | - C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x86-windows - C:/vcpkg/vcpkg integrate install - pip install setuptools scikit-build wheel cmake delvewheel - dir "C:/vcpkg/installed/x86-windows/bin" - - - name: Build wheels - uses: pypa/cibuildwheel@v3.3.1 - - - uses: actions/upload-artifact@v4 - with: - path: ./wheelhouse/*.whl - name: dist-windows_32 - build_macos_arm64_wheels: name: Build wheels on macos-15 (arm64) runs-on: macos-15 From 82f8c9b9e055ec188a53fd0153f90f88fc90d049 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:53:34 +0200 Subject: [PATCH 24/36] try older visual studio --- .github/workflows/python_packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 512c5a27..b39b03f6 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -59,7 +59,7 @@ jobs: name: Build wheels on Windows runs-on: windows-2025 env: - CMAKE_GENERATOR: "Visual Studio 18 2026" + CMAKE_GENERATOR: "Visual Studio 17 2022" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" From 351d3ac246bcfc86d9deec3090b561731ac96a39 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 15:57:48 +0200 Subject: [PATCH 25/36] use available VS --- .github/workflows/python_packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index b39b03f6..512c5a27 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -59,7 +59,7 @@ jobs: name: Build wheels on Windows runs-on: windows-2025 env: - CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR: "Visual Studio 18 2026" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" From 5eb64db525489dc4f4dcae6319841c43aab24adc Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:12:22 +0200 Subject: [PATCH 26/36] try newer pytho n and cbuildwheel action --- .github/workflows/python_packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 512c5a27..29140c30 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: '3.9' + python-version: '3.11' - name: Install Deps run: | @@ -81,7 +81,7 @@ jobs: dir "C:/vcpkg/installed/x64-windows/bin" - name: Build wheels - uses: pypa/cibuildwheel@v3.3.1 + uses: pypa/cibuildwheel@v4.1.0 - uses: actions/upload-artifact@v4 with: From 9e475651477f4ef83104d3fa3525c3d9b1ebe747 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:20:08 +0200 Subject: [PATCH 27/36] Revert "try newer pytho n and cbuildwheel action" This reverts commit 5eb64db525489dc4f4dcae6319841c43aab24adc. --- .github/workflows/python_packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 29140c30..512c5a27 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-python@v3 name: Install Python with: - python-version: '3.11' + python-version: '3.9' - name: Install Deps run: | @@ -81,7 +81,7 @@ jobs: dir "C:/vcpkg/installed/x64-windows/bin" - name: Build wheels - uses: pypa/cibuildwheel@v4.1.0 + uses: pypa/cibuildwheel@v3.3.1 - uses: actions/upload-artifact@v4 with: From 24e8a23fe63c5fc6cb6f34682ac6faa1b9a88cf7 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:22:21 +0200 Subject: [PATCH 28/36] try older runner with older VS --- .github/workflows/python_packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 512c5a27..80772bef 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -57,9 +57,9 @@ jobs: build_windows_wheels: name: Build wheels on Windows - runs-on: windows-2025 + runs-on: windows-2022 env: - CMAKE_GENERATOR: "Visual Studio 18 2026" + CMAKE_GENERATOR: "Visual Studio 17 2022" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" From 9ec4470d997da48ada0844b78d3604360cd11a17 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:31:58 +0200 Subject: [PATCH 29/36] Revert "try older runner with older VS" This reverts commit 24e8a23fe63c5fc6cb6f34682ac6faa1b9a88cf7. --- .github/workflows/python_packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 80772bef..512c5a27 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -57,9 +57,9 @@ jobs: build_windows_wheels: name: Build wheels on Windows - runs-on: windows-2022 + runs-on: windows-2025 env: - CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR: "Visual Studio 18 2026" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" From e53041f43295a3f37964a3fc7fe84aa729b8d5ad Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:50:52 +0200 Subject: [PATCH 30/36] try building only the latest python --- .github/workflows/python_packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 512c5a27..2d23774c 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -61,6 +61,7 @@ jobs: env: CMAKE_GENERATOR: "Visual Studio 18 2026" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" + CIBW_BUILD: "cp314-win_amd64" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" From 931e2bf513fb9876985e5d3f4ce320b44126c542 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 16:56:05 +0200 Subject: [PATCH 31/36] Revert "try building only the latest python" This reverts commit e53041f43295a3f37964a3fc7fe84aa729b8d5ad. --- .github/workflows/python_packages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 2d23774c..512c5a27 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -61,7 +61,6 @@ jobs: env: CMAKE_GENERATOR: "Visual Studio 18 2026" SQLite3_ROOT: "C:/vcpkg/installed/x64-windows" - CIBW_BUILD: "cp314-win_amd64" CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" From f8af8230f5afd2174a6b8393804e92e2680b2c85 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 17:02:53 +0200 Subject: [PATCH 32/36] try fix from opus --- .github/workflows/python_packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 512c5a27..795e0d0a 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -64,6 +64,7 @@ jobs: CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" + MSBUILDDISABLENODEREUSE: "1" steps: - uses: actions/checkout@v3 From 80de3bf9111b9b6b2ca682031a2802e7df1cc69a Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 29 Jun 2026 17:15:05 +0200 Subject: [PATCH 33/36] try new packaging from opus --- .github/workflows/python_packages.yml | 4 +-- geodiff/CMakeLists.txt | 8 +++-- pyproject.toml | 36 ++++++++++++++++++++- scripts/update_version.py | 6 ++-- setup.py | 45 --------------------------- 5 files changed, 46 insertions(+), 53 deletions(-) delete mode 100755 setup.py diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 795e0d0a..2147de56 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -173,10 +173,10 @@ jobs: - name: Install deps run: | pip install --upgrade pip - pip install setuptools twine scikit-build wheel cmake + pip install build twine - name: Build sdist - run: python setup.py sdist + run: python -m build --sdist - uses: actions/upload-artifact@v4 with: diff --git a/geodiff/CMakeLists.txt b/geodiff/CMakeLists.txt index 4ae76d28..5ec5382a 100644 --- a/geodiff/CMakeLists.txt +++ b/geodiff/CMakeLists.txt @@ -1,7 +1,7 @@ # GEODIFF (MIT License) # Copyright (C) 2019 Peter Petrik -CMAKE_MINIMUM_REQUIRED(VERSION 3.10) +CMAKE_MINIMUM_REQUIRED(VERSION 3.15) PROJECT(geodiffproject) SET(CMAKE_CXX_VISIBILITY_PRESET hidden) SET(CMAKE_VISIBILITY_INLINES_HIDDEN 1) @@ -26,7 +26,11 @@ ENDIF() IF(SKBUILD) MESSAGE(STATUS "The geodiff is built using scikit-build for pygeodiff Python package") - FIND_PACKAGE(PythonExtensions REQUIRED) + # scikit-build-core provides the project version as SKBUILD_PROJECT_VERSION; + # allow an explicit -DPYGEODIFFVERSION override for standalone invocations. + IF(NOT PYGEODIFFVERSION) + SET(PYGEODIFFVERSION "${SKBUILD_PROJECT_VERSION}") + ENDIF() SET(GEODIFF_NAME "pygeodiff-${PYGEODIFFVERSION}-python${GEODIFF_NAME_SUFFIX}") IF (CMAKE_GENERATOR_PLATFORM STREQUAL "Win32") SET(GEODIFF_NAME "${GEODIFF_NAME}-win32") diff --git a/pyproject.toml b/pyproject.toml index 4546686d..7111e95b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,36 @@ [build-system] -requires = ["setuptools", "wheel", "scikit-build", "cmake"] +requires = ["scikit-build-core>=0.10"] +build-backend = "scikit_build_core.build" + +[project] +name = "pygeodiff" +version = "2.3.0" +description = "Python wrapper around GeoDiff library" +readme = "README.md" +authors = [{ name = "Lutra Consulting Ltd.", email = "info@merginmaps.com" }] +license = { text = "MIT" } +requires-python = ">=3.7" +keywords = ["diff", "gis", "geo", "geopackage", "merge"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", +] + +[project.urls] +Homepage = "https://github.com/MerginMaps/geodiff" + +[tool.scikit-build] +# The geodiff C++ library (CMakeLists.txt) lives in the geodiff/ subdirectory. +cmake.source-dir = "geodiff" +# Pure-Python package shipped alongside the compiled library. +wheel.packages = ["pygeodiff"] +# The old setup.py used packages=["pygeodiff"], which did not ship the tests. +wheel.exclude = ["pygeodiff/tests/**"] +# CMakeLists.txt declares 3.15; let scikit-build-core fetch a matching CMake. +cmake.version = ">=3.15" + +[tool.scikit-build.cmake.define] +ENABLE_TESTS = "OFF" +ENABLE_COVERAGE = "OFF" +BUILD_TOOLS = "OFF" +PEDANTIC = "OFF" diff --git a/scripts/update_version.py b/scripts/update_version.py index e2fca5e3..bf0f0c3a 100644 --- a/scripts/update_version.py +++ b/scripts/update_version.py @@ -28,6 +28,6 @@ def replace_in_file(filepath, regex, sub): print("patching " + about_file) replace_in_file(about_file, "__version__\s=\s\".*", "__version__ = \"" + ver + "\"") -setup_file = os.path.join(dir_path, os.pardir, "setup.py") -print("patching " + setup_file) -replace_in_file(setup_file, "VERSION\s=\s\".*", "VERSION = \"" + ver + "\"") +pyproject_file = os.path.join(dir_path, os.pardir, "pyproject.toml") +print("patching " + pyproject_file) +replace_in_file(pyproject_file, r'^version = ".*"', 'version = "' + ver + '"') diff --git a/setup.py b/setup.py deleted file mode 100755 index 43011983..00000000 --- a/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from skbuild import setup -import platform - -# use scripts/update_version.py to update the version here and in other places at once -VERSION = "2.3.0" - -cmake_args = [ - '-DENABLE_TESTS:BOOL=OFF', - '-DENABLE_COVERAGE:BOOL=OFF', - '-DBUILD_TOOLS:BOOL=OFF', - '-DPEDANTIC:BOOL=OFF', - '-DPYGEODIFFVERSION='+str(VERSION) -] - -arch = platform.architecture()[0] # 64bit or 32bit -if ('Windows' in platform.system()) and ("32" in arch): - cmake_args.append('-AWin32') - -setup( - name="pygeodiff", - version=VERSION, - author="Lutra Consulting Ltd.", - author_email="info@merginmaps.com", - description="Python wrapper around GeoDiff library", - long_description="Python wrapper around GeoDiff library", - url="https://github.com/MerginMaps/geodiff", - packages=["pygeodiff"], - include_package_data=False, - keywords=["diff", "gis", "geo", "geopackage", "merge"], - scripts=[], - entry_points={"console_scripts": ["pygeodiff=pygeodiff.main:main"]}, - zip_safe=False, - cmake_args=cmake_args, - cmake_source_dir="geodiff", - cmake_with_sdist=False, - test_suite="tests.test_project", - python_requires=">=3.7", - license="License :: OSI Approved :: MIT License", - classifiers=[ - "Programming Language :: Python :: 3", - ], -) From 70253f8c599fcff1cb86d32c0c7d1a146512582d Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Tue, 30 Jun 2026 08:23:25 +0200 Subject: [PATCH 34/36] drop env variable --- .github/workflows/python_packages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 2147de56..0c45648b 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -64,7 +64,6 @@ jobs: CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" - MSBUILDDISABLENODEREUSE: "1" steps: - uses: actions/checkout@v3 From 7ee8f11b22f0d700bcce93f790c9a2e22ec53747 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Tue, 30 Jun 2026 08:36:46 +0200 Subject: [PATCH 35/36] Revert "drop env variable" This reverts commit 70253f8c599fcff1cb86d32c0c7d1a146512582d. --- .github/workflows/python_packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 0c45648b..2147de56 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -64,6 +64,7 @@ jobs: CIBW_SKIP: "*-win32" CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}" + MSBUILDDISABLENODEREUSE: "1" steps: - uses: actions/checkout@v3 From aa389f2a26e063bbc72f34cc452367d356a1a1b1 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Tue, 30 Jun 2026 08:44:52 +0200 Subject: [PATCH 36/36] update the build CI to match --- .github/workflows/python_packages.yml | 12 +----------- MANIFEST.in | 11 ----------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 MANIFEST.in diff --git a/.github/workflows/python_packages.yml b/.github/workflows/python_packages.yml index 2147de56..7a74f449 100644 --- a/.github/workflows/python_packages.yml +++ b/.github/workflows/python_packages.yml @@ -11,7 +11,6 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_ARCHS: x86_64 CIBW_BEFORE_ALL_LINUX: dnf makecache && dnf install --assumeyes sqlite-devel - CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: @@ -36,7 +35,6 @@ jobs: env: CIBW_BUILD: "*musllinux*" CIBW_BEFORE_ALL_LINUX: apk add sqlite-dev - CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()" steps: @@ -78,7 +76,7 @@ jobs: run: | C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x64-windows C:/vcpkg/vcpkg integrate install - pip install setuptools scikit-build wheel cmake delvewheel + pip install delvewheel dir "C:/vcpkg/installed/x64-windows/bin" - name: Build wheels @@ -112,10 +110,6 @@ jobs: with: python-version: '3.9' - - name: Install Deps - run: | - pip install setuptools scikit-build wheel cmake - - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 @@ -147,10 +141,6 @@ jobs: with: python-version: '3.9' - - name: Install Deps - run: | - pip install setuptools scikit-build wheel cmake - - name: Build wheels uses: pypa/cibuildwheel@v3.3.1 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 618fca33..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,11 +0,0 @@ -# Things to include in the built package (besides the packages defined in setup.py) -include LICENSE -include pyproject.toml -include geodiff/CMakeLists.txt -include geodiff/src/*.cpp -include geodiff/src/*.hpp -include geodiff/src/*.h -include geodiff/src/3rdparty/* -include geodiff/src/drivers/* -include geodiff/cmake_templates/* -include pygeodiff/*.py