cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
207 stars 111 forks source link

[2023.12] missing __init__.py file in the serialtbx ? #952

Closed picca closed 5 months ago

picca commented 5 months ago

Hello, I am preparing the Debian packaging and I need to add a bunch of init.py files in the serialtbx module.

I use for this this Makefile target

setup.py : debian/setup.py
        cp -f $< $@
        # add missing __init__.py files. It seems that it doesn not work when I use a patch
        touch serialtbx/__init__.py
        touch serialtbx/detector/legacy_metrology/__init__.py
        touch serialtbx/mono_simulation/__init__.py
        touch serialtbx/util/__init__.py

where setup.py contain only this

from setuptools import setup, find_packages

setup(
    name = "cctbx",
    version = "2023.12",
    author = "cctbx",
    author_email = "cctbx@cci.lbl.gov",
    description = "cctbx",
    license = "CCTBX 2.0",
    keywords = "crystallography",
    url = "http://cctbx.sourceforge.net/",
    packages=find_packages(
        where=".",
        exclude=["boost", "crys3d", "cudatbx", "prime", "xfel"],
    ),
    install_requires=[
        "h5py",
        "numpy",
        "matplotlib",
        # "_pycbf",
        "mrcfile",
        "ordered-set",
        "pint",
        "procrunner",
        "pymol",
        "requests",
        "scipy",
        "six",
        "PIL",
        "tqdm",
        "wxPython",
    ],
)

With this simple code, I can build and install all the cctbx python modules except the one from serialtbx because the init.py files are missing. So the find_package method does not recognize it as a module.

Is it possible to add them in the repository ?

phyy-nx commented 5 months ago

Done, thanks for the report!