From 6657f701a6f60ce0018be9b3fdc5112884978771 Mon Sep 17 00:00:00 2001 From: AlexWells Date: Wed, 1 Jun 2022 13:06:17 +0100 Subject: [PATCH 1/2] Remove now invalid command line argument Pip has updated on Python 3.7+ to disallow the out-of-tree-build arg --- .github/workflows/code.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 99fb4a82..7f693a9c 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -93,8 +93,6 @@ jobs: - name: Build Wheel run: cibuildwheel --output-dir dist env: - # Force old behaviour of pip - see https://github.com/pypa/cibuildwheel/issues/962 - CIBW_ENVIRONMENT: PIP_USE_DEPRECATED=out-of-tree-build CIBW_BUILD: ${{ matrix.python }}*64 CIBW_TEST_EXTRAS: dev CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{ matrix.results_file }} From e683ee3f03e0867cc7ea95f281a2f94d2b062cc0 Mon Sep 17 00:00:00 2001 From: Tom Cobb Date: Mon, 6 Jun 2022 15:47:03 +0100 Subject: [PATCH 2/2] Move iocStats into softioc so no soft links --- .gitmodules | 2 +- setup.cfg | 19 ++++++++----------- setup.py | 2 +- softioc/__init__.py | 3 ++- softioc/devIocStats.dbd | 1 - iocStats => softioc/iocStats | 0 softioc/iocStatsDb | 1 - softioc/softioc.py | 3 ++- 8 files changed, 14 insertions(+), 17 deletions(-) delete mode 120000 softioc/devIocStats.dbd rename iocStats => softioc/iocStats (100%) delete mode 120000 softioc/iocStatsDb diff --git a/.gitmodules b/.gitmodules index 6363345a..4c41b1de 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "iocStats"] - path = iocStats + path = softioc/iocStats url = https://github.com/epics-modules/iocStats.git diff --git a/setup.cfg b/setup.cfg index 3088277c..0452038e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,8 +29,14 @@ console_scripts = softioc = access.acf device.dbd - devIocStats.dbd - iocStatsDb/* + iocStats/devIocStats/* + iocStats/iocAdmin/Db/* + # Include the OS specific files in the sdist, even + # if not packages by setup.py (as we only build sdist on one arch) + iocStats/devIocStats/os/default/* + iocStats/devIocStats/os/Darwin/* + iocStats/devIocStats/os/WIN32/* + iocStats/devIocStats/os/Linux/* [options.extras_require] # Useful extras for use at DLS @@ -48,15 +54,6 @@ dev = cothread; sys_platform != "win32" p4p -# Include the OS specific files in the sdist, even -# if not packages by setup.py (as we only build sdist on one arch) -[options.data_files] -iocStats/devIocStats = iocStats/devIocStats/*.c, iocStats/devIocStats/*.h -iocStats/devIocStats/os/default = iocStats/devIocStats/os/default/* -iocStats/devIocStats/os/Darwin = iocStats/devIocStats/os/Darwin/* -iocStats/devIocStats/os/WIN32 = iocStats/devIocStats/os/WIN32/* -iocStats/devIocStats/os/Linux = iocStats/devIocStats/os/Linux/* - [flake8] max-line-length = 80 extend-ignore = diff --git a/setup.py b/setup.py index 7d7bc88c..34157bce 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ "osdPIDInfo.c", ] -devIocStats_src = os.path.join("iocStats", "devIocStats") +devIocStats_src = os.path.join("softioc", "iocStats", "devIocStats") devIocStats_os = os.path.join(devIocStats_src, "os", get_config_var('OS_CLASS')) devIocStats_default = os.path.join(devIocStats_src, "os", "default") diff --git a/softioc/__init__.py b/softioc/__init__.py index d826e87d..2fb60947 100644 --- a/softioc/__init__.py +++ b/softioc/__init__.py @@ -19,7 +19,8 @@ iocshRegisterCommon() for dbd in ('base.dbd', 'PVAServerRegister.dbd', 'qsrv.dbd'): dbLoadDatabase(dbd, os.path.join(path.base_path, 'dbd'), None) -dbLoadDatabase('devIocStats.dbd', os.path.dirname(__file__), None) +iocStats = os.path.join(os.path.dirname(__file__), "iocStats", "devIocStats") +dbLoadDatabase('devIocStats.dbd', iocStats, None) if registerRecordDeviceDriver(pdbbase): raise RuntimeError('Error registering') diff --git a/softioc/devIocStats.dbd b/softioc/devIocStats.dbd deleted file mode 120000 index 275179c0..00000000 --- a/softioc/devIocStats.dbd +++ /dev/null @@ -1 +0,0 @@ -../iocStats/devIocStats/devIocStats.dbd \ No newline at end of file diff --git a/iocStats b/softioc/iocStats similarity index 100% rename from iocStats rename to softioc/iocStats diff --git a/softioc/iocStatsDb b/softioc/iocStatsDb deleted file mode 120000 index c17da227..00000000 --- a/softioc/iocStatsDb +++ /dev/null @@ -1 +0,0 @@ -../iocStats/iocAdmin/Db \ No newline at end of file diff --git a/softioc/softioc.py b/softioc/softioc.py index 017db501..07449525 100644 --- a/softioc/softioc.py +++ b/softioc/softioc.py @@ -292,7 +292,8 @@ def devIocStats(ioc_name): '''This will load a template for the devIocStats library with the specified IOC name. This should be called before `iocInit`''' substitutions = 'IOCNAME=' + ioc_name + ', TODFORMAT=%m/%d/%Y %H:%M:%S' - iocstats_dir = os.path.join(os.path.dirname(__file__), 'iocStatsDb') + iocstats_dir = os.path.join( + os.path.dirname(__file__), 'iocStats', 'iocAdmin', 'Db') _add_records_from_file(iocstats_dir, 'ioc.template', substitutions)