Bluetooth-Devices / dbus-fast

A faster version of dbus-next
MIT License
39 stars 12 forks source link

dist wheel contains C source files on rebuilds #330

Closed rossburton closed 2 weeks ago

rossburton commented 2 weeks ago

If I build a wheel and then rebuild it, it contains generated C source code from cython:

$ unzip -l dist/dbus_fast-2.24.3-cp313-cp313-manylinux_2_40_aarch64.whl
Archive:  dist/dbus_fast-2.24.3-cp313-cp313-manylinux_2_40_aarch64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1948  1980-01-01 00:00   dbus_fast/__init__.py
      401  1980-01-01 00:00   dbus_fast/__version__.py
        0  1980-01-01 00:00   dbus_fast/_private/__init__.py
      211  1980-01-01 00:00   dbus_fast/_private/_cython_compat.py
   434327  1980-01-01 00:00   dbus_fast/_private/address.c
      287  1980-01-01 00:00   dbus_fast/_private/address.pxd
     4024  1980-01-01 00:00   dbus_fast/_private/address.py
      275  1980-01-01 00:00   dbus_fast/_private/constants.py
   791882  1980-01-01 00:00   dbus_fast/_private/marshaller.c
     2669  1980-01-01 00:00   dbus_fast/_private/marshaller.pxd
     7847  1980-01-01 00:00   dbus_fast/_private/marshaller.py
  1302827  1980-01-01 00:00   dbus_fast/_private/unmarshaller.c
     6524  1980-01-01 00:00   dbus_fast/_private/unmarshaller.pxd
    30520  1980-01-01 00:00   dbus_fast/_private/unmarshaller.py
     5660  1980-01-01 00:00   dbus_fast/_private/util.py
       90  1980-01-01 00:00   dbus_fast/aio/__init__.py
    20183  1980-01-01 00:00   dbus_fast/aio/message_bus.py
   390421  1980-01-01 00:00   dbus_fast/aio/message_reader.c
      226  1980-01-01 00:00   dbus_fast/aio/message_reader.pxd
     1613  1980-01-01 00:00   dbus_fast/aio/message_reader.py
     7045  1980-01-01 00:00   dbus_fast/aio/proxy_object.py
     4408  1980-01-01 00:00   dbus_fast/auth.py
     5495  1980-01-01 00:00   dbus_fast/constants.py
     1982  1980-01-01 00:00   dbus_fast/errors.py
       90  1980-01-01 00:00   dbus_fast/glib/__init__.py
    16455  1980-01-01 00:00   dbus_fast/glib/message_bus.py
    10724  1980-01-01 00:00   dbus_fast/glib/proxy_object.py
    22597  1980-01-01 00:00   dbus_fast/introspection.py
       53  1980-01-01 00:00   dbus_fast/main.py
   717176  1980-01-01 00:00   dbus_fast/message.c
     1287  1980-01-01 00:00   dbus_fast/message.pxd
    12432  1980-01-01 00:00   dbus_fast/message.py
  2119621  1980-01-01 00:00   dbus_fast/message_bus.c
     1866  1980-01-01 00:00   dbus_fast/message_bus.pxd
    47386  1980-01-01 00:00   dbus_fast/message_bus.py
    14103  1980-01-01 00:00   dbus_fast/proxy_object.py
        0  1980-01-01 00:00   dbus_fast/py.typed
     1637  1980-01-01 00:00   dbus_fast/send_reply.py
  1442916  1980-01-01 00:00   dbus_fast/service.c
     1105  1980-01-01 00:00   dbus_fast/service.pxd
    23516  1980-01-01 00:00   dbus_fast/service.py
  1083718  1980-01-01 00:00   dbus_fast/signature.c
      480  1980-01-01 00:00   dbus_fast/signature.pxd
    16875  1980-01-01 00:00   dbus_fast/signature.py
   287672  1980-01-01 00:00   dbus_fast/unpack.c
      181  1980-01-01 00:00   dbus_fast/unpack.pxd
      622  1980-01-01 00:00   dbus_fast/unpack.py
     5239  1980-01-01 00:00   dbus_fast/validators.py
   570040  1980-01-01 00:00   dbus_fast/_private/address.cpython-313-aarch64-linux-gnu.so
   937696  1980-01-01 00:00   dbus_fast/_private/marshaller.cpython-313-aarch64-linux-gnu.so
  1541768  1980-01-01 00:00   dbus_fast/_private/unmarshaller.cpython-313-aarch64-linux-gnu.so
   330688  1980-01-01 00:00   dbus_fast/aio/message_reader.cpython-313-aarch64-linux-gnu.so
   772912  1980-01-01 00:00   dbus_fast/message.cpython-313-aarch64-linux-gnu.so
  2863944  1980-01-01 00:00   dbus_fast/message_bus.cpython-313-aarch64-linux-gnu.so
  2034776  1980-01-01 00:00   dbus_fast/service.cpython-313-aarch64-linux-gnu.so
  1377424  1980-01-01 00:00   dbus_fast/signature.cpython-313-aarch64-linux-gnu.so
   262264  1980-01-01 00:00   dbus_fast/unpack.cpython-313-aarch64-linux-gnu.so
     1083  1980-01-01 00:00   dbus_fast-2.24.3.dist-info/LICENSE
    10659  1980-01-01 00:00   dbus_fast-2.24.3.dist-info/METADATA
      111  1980-01-01 00:00   dbus_fast-2.24.3.dist-info/WHEEL
     5310  2016-01-01 00:00   dbus_fast-2.24.3.dist-info/RECORD

I guess the problem is due to poetry reusing a build directory?

bdraco commented 2 weeks ago

https://github.com/Bluetooth-Devices/dbus-fast/blob/2831f9cc3633d4c6e47232f741213da2adbaf71a/build_ext.py#L41

Looks like this stopped working

bdraco commented 2 weeks ago

Probably could use the same fix as https://github.com/python-zeroconf/python-zeroconf/pull/1424 if you are interested in doing a PR