Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheel for Python 3.12 in Windows #8

Open
brian7704 opened this issue Jun 11, 2024 · 0 comments
Open

Wheel for Python 3.12 in Windows #8

brian7704 opened this issue Jun 11, 2024 · 0 comments

Comments

@brian7704
Copy link

I was trying to install this library from PyPI on Windows 10 and Python 3.12 but it failed to build with the following error.

PS C:\Users\h\ots\unishox2-py3-1.0.0> pip install unishox2-py3
Collecting unishox2-py3
  Using cached unishox2-py3-1.0.0.tar.gz (28 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      running egg_info
      writing unishox2_py3.egg-info\PKG-INFO
      writing dependency_links to unishox2_py3.egg-info\dependency_links.txt
      writing top-level names to unishox2_py3.egg-info\top_level.txt
      reading manifest file 'unishox2_py3.egg-info\SOURCES.txt'
      Traceback (most recent call last):
        File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
          dist.run_commands()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\dist.py", line 968, in run_command
          super().run_command(command)
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 321, in run
          self.find_sources()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 329, in find_sources
          mm.run()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 550, in run
          self.add_defaults()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 595, in add_defaults
          self.read_manifest()
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\sdist.py", line 203, in read_manifest
          self.filelist.append(line)
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 487, in append
          path = convert_path(item)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\h\AppData\Local\Temp\pip-build-env-j971_3j_\overlay\Lib\site-packages\setuptools\_distutils\util.py", line 132, in convert_path
          raise ValueError("path '%s' cannot be absolute" % pathname)
      ValueError: path '/home/runner/work/unishox2-py3/unishox2-py3/unishox2_module.c' cannot be absolute
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I downloaded the source package from PyPI and was able to build the wheel I needed by removing these two lines from SOURCES.txt

/home/runner/work/unishox2-py3/unishox2-py3/unishox2_module.c
/home/runner/work/unishox2-py3/unishox2-py3/Unishox2/unishox2.c

You can download the wheel here.

My project OpenTAKServer uses unishox2-py3 and I was wondering if you could add this wheel to PyPI or build one yourself and add to PyPI. That would make installation easier for my users. Thanks!

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

No branches or pull requests

1 participant