dls-controls / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
32 stars 7 forks source link

Pin pvxs to earlier version #145

Closed evalott100 closed 6 months ago

evalott100 commented 6 months ago

When pandablocks-ioc uses softioc version 4.5.0, the following import error occurs:

.venv) [twj43146@pc0139 PandABlocks-ioc-fork]$ pytest
filename="modules/database/src/ioc/dbStatic/dbLexRoutines.c" line number=276dbRead opening file pvxsIoc.dbd
ImportError while loading conftest '/scratch/twj43146/Programming/PandABlocks-ioc-fork/tests/conftest.py'.
tests/conftest.py:3: in <module>
    from fixtures.mocked_panda import *
tests/fixtures/mocked_panda.py:38: in <module>
    from softioc import builder
.venv/lib/python3.10/site-packages/softioc/__init__.py:25: in <module>
    dbLoadDatabase('pvxsIoc.dbd', pvxslibs.path.dbd_path, None)
.venv/lib/python3.10/site-packages/softioc/imports.py:45: in expect_success
    assert status == 0, 'Expected success'
E   AssertionError: Expected success

This is caused by the latest release of pvxs.

Pinning "pvxslibs==1.2.4" fixes this problem.

@AlexanderWells-diamond, am I good to do this?

AlexanderWells-diamond commented 6 months ago

This isn't so clear cut unfortunately. The issue is that we cannot load pvxsIoc.dbd anymore, which used to be shipped with pvsxlibs. Now there are two dbd files shipped: pvxs3x.dbd and pvxs7x.dbd (seen in pvxslibs/dbd in an installed version or in pvsxlibs/ioc if looking at sources)

I'm inclined to say that we should instead be loading pvxs7x.dbd, as we are built against R7.0.7 (due to epicscorelibs dependency). I don't know enough about pvxs to know if this may cause other problems though - @coretl, does using the R7 version make the most sense?

coretl commented 6 months ago

yes

AlexanderWells-diamond commented 6 months ago

No longer necessary - see #146 .