MagicStack / httptools

Fast HTTP parser
MIT License
1.21k stars 83 forks source link

Cython source files missing in sdist #110

Closed mgorny closed 1 month ago

mgorny commented 1 month ago

When trying to build from 0.6.2 with cython-always option, I'm getting the following error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 443, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 439, in main
    return func(args)
           ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 229, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gpep517/__main__.py", line 221, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 421, in build_wheel
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
    exec(code, locals())
  File "<string>", line 171, in <module>
  File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
    self.run_command("build")
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 78, in run
    self.build_package_data()
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 175, in build_package_data
    for target, srcfile in self._get_package_data_output_mapping():
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 167, in _get_package_data_output_mapping
    for package, src_dir, build_dir, filenames in self.data_files:
                                                  ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 87, in __getattr__
    self.data_files = self._get_data_files()
                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 99, in _get_data_files
    self.analyze_manifest()
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_py.py", line 197, in analyze_manifest
    self.run_command('egg_info')
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 311, in run
    self.find_sources()
  File "/usr/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 319, in find_sources
    mm.run()
  File "/usr/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 540, in run
    self.add_defaults()
  File "/usr/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 578, in add_defaults
    sdist.add_defaults(self)
  File "/usr/lib/python3.12/site-packages/setuptools/command/sdist.py", line 108, in add_defaults
    super().add_defaults()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
    self._add_defaults_ext()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 334, in _add_defaults_ext
    build_ext = self.get_finalized_command('build_ext')
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 303, in get_finalized_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "<string>", line 105, in finalize_options
  File "/usr/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1010, in cythonize
    module_list, module_metadata = create_extension_list(
                                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 845, in create_extension_list
    for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
  File "/usr/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 117, in nonempty
    raise ValueError(error_msg)
ValueError: 'httptools/parser/parser.pyx' doesn't match any files

And indeed, the file is missing from the tarball.