Closed thomascobb closed 2 years ago
At the moment we make the sdist on Linux, which pulls in sources for Linux only: https://github.com/dls-controls/pythonSoftIOC/blob/master/setup.py#L46
DevIocStats requires different sources for windows, so we might be able to get away with adding them as package_data?
C:\Users\guent>pip install softioc Collecting softioc Using cached softioc-4.0.1.tar.gz (58 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting epicsdbbuilder>=1.4 Using cached epicsdbbuilder-1.5-py3-none-any.whl (23 kB) Requirement already satisfied: numpy in c:\users\guent\appdata\local\programs\python\python310\lib\site-packages (from softioc) (1.22.2) Requirement already satisfied: epicscorelibs<7.0.6.99.3,>=7.0.6.99.2.0 in c:\users\guent\appdata\local\programs\python\python310\lib\site-packages (from softioc) (7.0.6.99.2.0) Requirement already satisfied: setuptools in c:\users\guent\appdata\local\programs\python\python310\lib\site-packages (from epicscorelibs<7.0.6.99.3,>=7.0.6.99.2.0->softioc) (58.1.0) Requirement already satisfied: setuptools-dso>=2.0a1 in c:\users\guent\appdata\local\programs\python\python310\lib\site-packages (from epicscorelibs<7.0.6.99.3,>=7.0.6.99.2.0->softioc) (2.5) Building wheels for collected packages: softioc Building wheel for softioc (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for softioc (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [97 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.10 creating build\lib.win-amd64-3.10\softioc copying softioc\alarm.py -> build\lib.win-amd64-3.10\softioc copying softioc\asyncio_dispatcher.py -> build\lib.win-amd64-3.10\softioc copying softioc\builder.py -> build\lib.win-amd64-3.10\softioc copying softioc\device.py -> build\lib.win-amd64-3.10\softioc copying softioc\device_core.py -> build\lib.win-amd64-3.10\softioc copying softioc\fields.py -> build\lib.win-amd64-3.10\softioc copying softioc\imports.py -> build\lib.win-amd64-3.10\softioc copying softioc\pvlog.py -> build\lib.win-amd64-3.10\softioc copying softioc\pythonSoftIoc.py -> build\lib.win-amd64-3.10\softioc copying softioc\softioc.py -> build\lib.win-amd64-3.10\softioc copying softioc\_version_git.py -> build\lib.win-amd64-3.10\softioc copying softioc\__init__.py -> build\lib.win-amd64-3.10\softioc copying softioc\__main__.py -> build\lib.win-amd64-3.10\softioc copying softioc\access.acf -> build\lib.win-amd64-3.10\softioc copying softioc\device.dbd -> build\lib.win-amd64-3.10\softioc copying softioc\devIocStats.dbd -> build\lib.win-amd64-3.10\softioc creating build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\access.db -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\access.doc -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\ioc.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocAdminRTEMS.substitutions -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocAdminScanMon.substitutions -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocAdminSoft.substitutions -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocAdminVxWorks.substitutions -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocCluster.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocEnvVar.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocGeneralTime.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocQueue.db -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocRTEMSOnly.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocRTOS.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocScanMon.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocScanMonSum.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\iocVxWorksOnly.template -> build\lib.win-amd64-3.10\softioc\iocStatsDb copying softioc\iocStatsDb\Makefile -> build\lib.win-amd64-3.10\softioc\iocStatsDb running build_ext Traceback (most recent call last): File "C:\Users\guent\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "C:\Users\guent\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\guent\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\build_meta.py", line 244, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\build_meta.py", line 229, in _build_with_temp_dir self.run_setup() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\build_meta.py", line 281, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 103, in <module> setup( File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools_dso\__init__.py", line 60, in setup _setup(**kws) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\__init__.py", line 155, in setup return distutils.core.setup(**attrs) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 148, in setup return run_commands(dist) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands dist.run_commands() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands self.run_command(cmd) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command cmd_obj.run() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run self.run_command('build') File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command cmd_obj.run() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command cmd_obj.run() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools_dso\dsocmd.py", line 509, in run _build_ext.run(self) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 79, in run _build_ext.run(self) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 339, in run self.build_extensions() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools_dso\dsocmd.py", line 512, in build_extension expand_sources(self, ext.sources) File "C:\Users\guent\AppData\Local\Temp\pip-build-env-e52ue2nf\overlay\Lib\site-packages\setuptools_dso\dsocmd.py", line 88, in expand_sources raise RuntimeError("Missing source file: %s"%src) RuntimeError: Missing source file: iocStats\devIocStats\os\default\osdCpuUsage.c [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for softioc Failed to build softioc ERROR: Could not build wheels for softioc, which is required to install pyproject.toml-based projects
At the moment we make the sdist on Linux, which pulls in sources for Linux only: https://github.com/dls-controls/pythonSoftIOC/blob/master/setup.py#L46
DevIocStats requires different sources for windows, so we might be able to get away with adding them as package_data?