Skip to content

Windows support - #51

Merged
tynanford merged 5 commits into
epics-modules:masterfrom
pheest:Windows_support
Aug 10, 2026
Merged

Windows support#51
tynanford merged 5 commits into
epics-modules:masterfrom
pheest:Windows_support

Conversation

@pheest

@pheest pheest commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

In dbdset.c, <sharelib.h> needs to be included in order to enable the use of epicsShareExtern for the linker to access pvar_rset_aSubRSET.

I rules_py, use of 'install -m 644' is not suitable for Windows use.
I have replaced this with use of equivalent EPICS compatability macros.

In config_py, the file extension of the _dbapi module file needs to be '.pyd' (not .dll') or Python won't load it.
(Please do not ask me why, when Python on Linux loads a '.so' file just fine.)

In ci-scripts-build.yaml, I have added testing for Windows.
Note the issue described by epics-base/ci-scripts#112 which has been addressed recently.
Thank you @ralphlange and @anderslindho for making this possible.
I have added 'bash' as the shell for the 'more setup python' command which otherwise uses Linux syntax.

In makehelper.py, Python sysconfig has been available since Python3.2.
We say that we support the module from 3.6.
So ... why do we still need to use distutils at all?
Python on Windows did not have the 'LIBDIR' variable until 3.13.
The 'libs' subfolder of the Python install is however always where library files are located, so that can be used.
'BASECFLAGS' is not a define on Windows.

@pheest
pheest requested review from tynanford and zhangt58 July 30, 2026 17:33
Comment thread configure/RELEASE.windows-x64.common Outdated
Comment thread devsupApp/src/devsup/_dbapi.dbd Outdated
@tynanford

Copy link
Copy Markdown
Collaborator

Thanks @pheest ! I don't have a windows setup here to test right now. The linux IOC we have still runs as before so that is good. In general the changes look good to me. Tagging a few others in case they use windows @kangarooMouse @phbran @eddybl

In makehelper.py, Python sysconfig has been available since Python3.2.
We say that we support the module from 3.6.
So ... why do we still need to use distutils at all?

Yes that is good. I think at the time, we decided to advertise >=3.6 but kept the code compatible with lower versions. We are now long past the time when that makes sense.

Removed the calcout type from _dbdapi.dbd
Reverted use of get_pyhon_version to use of get_config_var('VERSION').
Added use of <direct.h> to setup.c to resolve a compiler warning.
Comment thread devsupApp/src/devsup/__init__.py Outdated

@tynanford tynanford left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the small f string issue this looks ready to merge to me

@tynanford
tynanford merged commit 88d8a9d into epics-modules:master Aug 10, 2026
20 checks passed
This was referenced Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants