krcb197 / PeakRDL-python

Generate Python Register Access Layer (RAL) from SystemRDL
GNU General Public License v3.0
4 stars 2 forks source link

installing PeakRDL-python also installs old version of peakrdl #117

Closed jeras closed 10 months ago

jeras commented 10 months ago

I spent 2h now figuring out why a generator was not working. I figured out the installation of PeakRDL-python is pulling in peakrdl version 0.9.0, thus breaking other targets supported by version 1.1.0. I do not know what is the best way to fix this dependency.

krcb197 commented 10 months ago

@jeras I am not really sure why this is happening, the current version of peakrdl-python does not include peakrdl within its project dependencies.

See setup.py:

    install_requires=[
        "systemrdl-compiler>=1.24.0",
        "jinja2",
        "asynctest;python_version<'3.8'",
        "peakrdl-ipxact"
    ]

It has its own command line tool at the moment (soon to be deprecated). At the moment the user needs to install peakrdl-python themselves to use the full suite with peakrdl-python.

In order to do a test, I did the following:

  1. I have made a clean Python 3.10 Virtual environment.
  2. Installed the latest peakrdl-python
  3. Checked the versions of everything installed

Here is a full log of the test:

C:\temp>c:\Users\******\AppData\Local\Programs\Python\Python311\python -m venv clean_venv

C:\temp>clean_venv\Scripts\activate.bat

(clean_venv) C:\temp>python -m pip install peakrdl-python
Collecting peakrdl-python
  Downloading peakrdl-python-0.6.7.tar.gz (52 kB)
     ---------------------------------------- 52.8/52.8 kB ? eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting systemrdl-compiler>=1.24.0
  Downloading systemrdl_compiler-1.27.1-cp311-cp311-win_amd64.whl (917 kB)
     ---------------------------------------- 917.6/917.6 kB 8.3 MB/s eta 0:00:00
Collecting jinja2
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting peakrdl-ipxact
  Using cached peakrdl-ipxact-3.4.3.tar.gz (27 kB)
  Preparing metadata (setup.py) ... done
Collecting antlr4-python3-runtime<4.14,>=4.11
  Using cached antlr4_python3_runtime-4.13.1-py3-none-any.whl (144 kB)
Collecting colorama
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting markdown
  Using cached Markdown-3.5.1-py3-none-any.whl (102 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl (17 kB)
Installing collected packages: antlr4-python3-runtime, MarkupSafe, markdown, colorama, systemrdl-compiler, jinja2, peakrdl-ipxact, peakrdl-python
  DEPRECATION: peakrdl-ipxact 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
  Running setup.py install for peakrdl-ipxact ... done
  DEPRECATION: peakrdl-python 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
  Running setup.py install for peakrdl-python ... done
Successfully installed MarkupSafe-2.1.3 antlr4-python3-runtime-4.13.1 colorama-0.4.6 jinja2-3.1.2 markdown-3.5.1 peakrdl-ipxact-3.4.3 peakrdl-python-0.6.7 systemrdl-compiler-1.27.1

[notice] A new release of pip available: 22.3.1 -> 23.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

(clean_venv) C:\temp>pip list
Package                Version
---------------------- -------
antlr4-python3-runtime 4.13.1
colorama               0.4.6
Jinja2                 3.1.2
Markdown               3.5.1
MarkupSafe             2.1.3
peakrdl-ipxact         3.4.3
peakrdl-python         0.6.7
pip                    22.3.1
setuptools             65.5.0
systemrdl-compiler     1.27.1

[notice] A new release of pip available: 22.3.1 -> 23.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Can you please repeat this test and confirm the result?

krcb197 commented 10 months ago

Just to be double sure I have gone ahead and removed peakrdl-ipxact from the peakrdl-python dependencies, by removing its own console command. There will be a new 0.7.0 release shortly. Can you try that.

jeras commented 10 months ago

I am confused now, it does seem I messed up this bug report. I am unsure what caused the install of peakrdl 0.9.0. I will try it again and get back to you.

jeras commented 10 months ago

I just checked again, a different plugin was causing the issue. I was installing a list of plugins, but assumed the Python one was the culprit, since I was using it.

https://github.com/SystemRDL/PeakRDL-Markdown/issues/9

I appologize.

krcb197 commented 10 months ago

No problem, I hate these complex interactions between dependencies.

Thank you for taking the time to follow up