Package python package that relies on `python setup.py develop`?

How does one go about packaging a python library that expects to be installed via python setup.py develop instead of python setup.py install?

I’m currently attempting to package nocturne, and its official installation instructions suggest running python setup.py develop. As a result, the nix build succeeds but then importing doesn’t work since it’s not appropriately installing the files into site-packages/… Anyone have any idea how to package this kind of thing?

The exact failure is

Check whether the following modules can be imported: nocturne
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
  File "/nix/store/al6g1zbk8li6p8mcyp0h60d08jaahf8c-python3-3.10.9/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'nocturne'

Solution was to patch setup.py and add

packages=["nocturne", "cfgs"],

But the setup.py develop command installs the package in an editable state i.e. the name “develop” because it allows the person to modify the code and try the package without re-installing it. It doesn’t seem that brings so much value in the context of Nix packaging where all the packages are read-only. Other than that, it should behave the same as a python setup.py install