Skip to content

RogerMarsh/dptdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===============================
Build dpt3.0-dptdb from Archive
===============================

.. contents::


Description
===========

dpt3.0-dptdb is a Python interface, built using SWIG, to DPT DBMS version 3 release 0.

This project, which builds dpt3.0-dptdb, is called dptdb.

These makefiles build dpt3.0-dptdb from patched copies of the source extracted from DPT_V3R0_DBMS.ZIP on the toolchains in Developer Command Prompt for VS2017 and Msys2.

The default output is Python packages in wheel (*.whl) format.

The makefiles are able to install the Python packages on the box on which they are run.

The Visual Studio build succeeds only at the c++14 standard.

The Msys2 build succeeds at all the c++ standards supported: c++98, c++03, c++11, c++14, c++17, c++20, and c++23.



Documentation
=============

The DPT documentation is extracted from DPT_V3R0_DOCS.ZIP and placed at dpt/extract/docs_v3r0/.



Using the Makefiles
===================

Four sets of makefiles exist: prefixed with 'v3r0_msys2', 'v3r0_msys2_64', 'v3r0_vs<year>' and 'v3r0_vs<year>_64'.

The 'v3r0_vs2017_c++14', 'v3r0_vs2017_64_c++14', and all the 'msys2' builds succeed.

The other *vs* makefiles were created while figuring what worked: all encounter the same compilation error and my c++ knowledge is not enough to craft a solution.

The rest of this section describes builds for a 32-bit Python at the 'c++14' standard.  Builds for a 64-bit Python are done with '_64' version of the makefile.  The 'msys2' builds are done with the Python installed by pacman.  Makefiles for 'vs' builds exist for various Python versions (in principle those which have not reached end of life).

Do 'make -f fetch.Makefile' in a Msys2 shell to extract the archives.  (The makefile is able to fetch the archives but does not need to because they are included in the dptdb download.)

Then either

do 'make -f v3r0_msys2_c++14.Makefile' in a Msys2 mingw32 shell to apply patches and build the interface,

or

do 'make -f v3r0_vs2017_c++14_copy.Makefile' in a Msys2 shell to apply patches to fix source code which does not compile on this Visual Studio C++ version,

and then do 'nmake -f v3r0_vs2017_c++14_pyX-Y_32.Nmakefile' in a 'x86 Native Tools Command Prompt for VS 2017', replacing X by the Python major version and Y by the Python minor version to build the interface.

For 64-bit Visual Studio builds use 'x64 Native Tools Command Prompt for VS 2017'. 

The Msys2 environment is needed, even for Visual Studio builds, to use the 'sed' utility to patch the DPT DBMS source code.



dpt3.0-dptdb Installation Instructions
======================================

Run 'py -m pip install --user dpt3.0-dptdb' to install a version built with Developer Command Prompt for VS2017 available on PyPI (see py documentation for selecting Python version).

Alternatively follow the 'Using the Makefiles' instructions but the final step is run 'nmake -f v3r0_vs2017_c++14_pyX-Y_32.Nmakefile local-install' (not 'nmake -f v3r0_vs2017_c++14_pyX-Y_32.Nmakefile') where X-Y is something like '3-10'.

To install dpt3.0-dptdb in Msys2 follow the 'Using the Makefiles' instructions but the final step is run 'make -f v3r0_msys2_c++14.Makefile local-install' (not 'make -f v3r0_msys2_c++14.Makefile').



dpt3.0-dptdb Wheel Name
=======================

Both the Msys2 and Developer Command Prompt for VS2017 builds name the wheel 'dpt3.0_dptdb-1.0.0.dev0-py3-none-any.whl', assuming version is '1.0.0.dev0' in the pyproject.toml file.

After consulting 'packaging.python.org' on 'Python Tag', 'ABI Tag' and 'Platform Tag'; and finding that sys.implementation.name is 'cpython' for both; and seeing 'distutils.util.get_platform()' output for 32-bit and 64-bit Msys2 and VS; the wheels are renamed:

    'dpt3.0_dptdb-1.0.0.dev0-cp310-cp310-mingw_i686.whl',
    'dpt3.0_dptdb-1.0.0.dev0-cp310-cp310-mingw_x86_64.whl',
    'dpt3.0_dptdb-1.0.0.dev0-cp310-cp310-win32.whl',
    'dpt3.0_dptdb-1.0.0.dev0-cp310-cp310-win_amd64.whl',

as appropriate assuming Python 3.10 is used to generate the dptapi.py file via SWIG and the _dptapi.pyd C++ DLL.



Contact
=======

A copy of the contact details is in the package-template/pyproject.toml file.

About

DPT database API wrappers built using SWIG

Resources

License

Stars

Watchers

Forks

Packages

No packages published