pyindi-client icon indicating copy to clipboard operation
pyindi-client copied to clipboard

PyIndi.py module not being installed

Open aaronwmorris opened this issue 10 months ago • 7 comments

In the recent updates, it appears that the build process is not installing the PyIndi.py module. I tried to fix this in #53, which works when installing locally, but not when building directly from git.

What is tricky about this is if you already have the module installed, you will not notice the problem since the file already exists. You have to fully uninstall pyindi-client before re-installing to see the failure.

aaronwmorris avatar Feb 07 '25 18:02 aaronwmorris

For me, on RPi 0, and Bookworm, it doesn't install at all. Not with pip install pyindi-client or with pip install pyindi-client --no-cache-dir, even after Jasem's recent update.

I get:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyindi-client
  Downloading pyindi-client-1.9.1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: pyindi-client
  DEPRECATION: pyindi-client is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

Is that the same as your error?

Steve.

SteveBz avatar Feb 08 '25 07:02 SteveBz

The new pyindi-client uses TOML project file, so this is updated already. The problem is that the CI/CD job fails. If it is successfully, it should upload the latest version to pypi as the one there is outdated.

I need help on this as I exhausted several hours trying to diagnose the docker build issue. I even asked a devops engineer to look at this and it's still not resolved.

knro avatar Feb 08 '25 08:02 knro

I'm debugging at the moment with chatgpt. I'll let you know.

Steve.

⁣Get BlueMail for Android ​

On 8 Feb 2025, 08:14, at 08:14, Jasem Mutlaq @.***> wrote:

The new pyindi-client uses TOML project file, so this is updated already. The problem is that the CI/CD job fails. If it is successfully, it should upload the latest version to pypi as the one there is outdated.

I need help on this as I exhausted several hours trying to diagnose the docker build issue. I even asked a devops engineer to look at this and it's still not resolved.

-- Reply to this email directly or view it on GitHub: https://github.com/indilib/pyindi-client/issues/54#issuecomment-2644716543 You are receiving this because you commented.

Message ID: @.***>

SteveBz avatar Feb 08 '25 08:02 SteveBz

I am trying to build from GitHub, as well, and I get the following error (arrows added to indicate important lines):

     /tmp/pip-build-env-wx5tbwp0/overlay/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py:72: _ExperimentalConfiguration: `[tool.setuptools.ext-modules]` in `pyproject.toml` is still *experimental* and likely to change in future releases.
        config = read_configuration(filepath, True, ignore_option_errors, dist)
      running bdist_wheel
      running build
      running build_py
-->   file PyIndi.py (for module PyIndi) not found
-->   file PyIndi.py (for module PyIndi) not found
      running egg_info
      writing pyindi_client.egg-info/PKG-INFO
      writing dependency_links to pyindi_client.egg-info/dependency_links.txt
      writing requirements to pyindi_client.egg-info/requires.txt
      writing top-level names to pyindi_client.egg-info/top_level.txt
-->   file PyIndi.py (for module PyIndi) not found
      reading manifest file 'pyindi_client.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'pyindi_client.egg-info/SOURCES.txt'
      running build_ext
      building '_PyIndi' extension
      swigging indiclientpython.i to indiclientpython_wrap.cpp
      swig -python -v -Wall -c++ -threads -I/usr/include -I/usr/include/libindi -I/usr/local/include/libindi -o indiclientpython_wrap.cpp indiclientpython.i
      Language subdirectory: python
      Search paths:
         ./
         /usr/include/
         /usr/include/libindi/
         /usr/local/include/libindi/
         ./swig_lib/python/
         /usr/share/swig4.0/python/
         ./swig_lib/
         /usr/share/swig4.0/
      Preprocessing...
      Starting language-specific parse...
      ... (Lots of warning messages)
      Processing types...
      C++ analysis...
      Processing nested classes...
      Generating wrappers...
-->   error: unknown file type '.py' (from 'PyIndi.py')
      [end of output]

Is my error a manifestation of this issue (i.e., "PyIndi.py module not being installed" #54)?

tbowers7 avatar Feb 21 '25 20:02 tbowers7

@tbowers7 While we figure this out the problem with the new build process, install using the older build. There is no difference with the indi integrations.

pip install "git+https://github.com/indilib/pyindi-client.git@d8ad88f#egg=pyindi-client"

aaronwmorris avatar Feb 21 '25 21:02 aaronwmorris

I had the same problem as tbowers7 when installing on raspberry 5. I solved it by changing the line: sources = ["PyIndi.py", "indiclientpython.i"] into sources = ["indiclientpython.i"] in pyproject.toml

I also changed the swig options into pyproject.toml and setup.cfg: remove -thread and add -python (swig version 4.1.0, virtual env with miniconda and python 3.11)

coutanto avatar Mar 14 '25 15:03 coutanto

@coutanto Adding PyIndi.py to the sources was my attempt to fix the real underlying problem. If you fully uninstall pyindi-client and try the build, the PyIndi.py file is never installed. It worked for you because the PyIndi.py file was already in place from a previous install.

It is a more insidious failure, because the installer acts like everything was successful, but you end up with import failures when you try to use it.

I think its better to leave the current error in place because at least there is an explicit error during the install.

aaronwmorris avatar Mar 14 '25 16:03 aaronwmorris

@knro Unfortunately, I think this is still a problem when installing directly from github at bc3a9fe the PyIndi.py module is still not installed.

This is the pip command I used.

pip3 uninstall pyindi-client

pip3 install 'git+https://github.com/indilib/pyindi-client.git@bc3a9fe#egg=pyindi-client'

aaronwmorris avatar Dec 07 '25 03:12 aaronwmorris