Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: enable pyrp3 dependency for all platforms #417

Closed

Conversation

doronbehar
Copy link
Contributor

No other machines should really use the server, and this dependency doesn't hurt any other platform that is used to test the server. This also helps a bit installing the server in an offline manner (#378), see also:

jazzband/pip-tools#1220

No other machines should really use the server, and this dependency
doesn't hurt any other platform that is used to test the server. This
also helps a bit installing the server in an offline manner (linien-org#378), see
also:

jazzband/pip-tools#1220
@bleykauf
Copy link
Collaborator

The restriction for pyrp3 is required for installing linien-server on other platforms for running the server with the --fake flag.

@bleykauf bleykauf changed the base branch from master to develop August 13, 2024 12:54
@bleykauf bleykauf closed this Aug 13, 2024
@doronbehar
Copy link
Contributor Author

The restriction for pyrp3 is required for installing linien-server on other platforms for running the server with the --fake flag.

But @bleykauf I don't understand - you can run linien-server run --fake even if you have pyrp3 installed as well - what's wrong with including pyrp3 unconditionally?

@bleykauf
Copy link
Collaborator

The issue is that pyrp3 cannot be installed on Windows machines, at least not without additional requirements:

(linien-3.12) PS C:\Users\bastian\Documents\programming\pyrp3> pip install  pyrp3==2.0.2rc1
Collecting pyrp3==2.0.2rc1
  Using cached pyrp3-2.0.2rc1.tar.gz (14 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cached-property<2.0,>=1.5.2 (from pyrp3==2.0.2rc1)
  Using cached cached_property-1.5.2-py2.py3-none-any.whl.metadata (11 kB)
Collecting myhdl>=0.11 (from pyrp3==2.0.2rc1)
  Using cached myhdl-0.11.49-py3-none-any.whl.metadata (3.4 kB)
Requirement already satisfied: numpy<2.0,>=1.21.5 in c:\users\bastian\miniconda3\envs\linien-3.12\lib\site-packages (from pyrp3==2.0.2rc1) (1.26.4)
Requirement already satisfied: rpyc<7.0,>=6.0.0 in c:\users\bastian\miniconda3\envs\linien-3.12\lib\site-packages (from pyrp3==2.0.2rc1) (6.0.0)
Requirement already satisfied: plumbum in c:\users\bastian\miniconda3\envs\linien-3.12\lib\site-packages (from rpyc<7.0,>=6.0.0->pyrp3==2.0.2rc1) (1.8.3)
Requirement already satisfied: pywin32 in c:\users\bastian\miniconda3\envs\linien-3.12\lib\site-packages (from plumbum->rpyc<7.0,>=6.0.0->pyrp3==2.0.2rc1) (306)
Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Using cached myhdl-0.11.49-py3-none-any.whl (157 kB)
Building wheels for collected packages: pyrp3
  Building wheel for pyrp3 (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyrp3 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyrp3
Failed to build pyrp3
ERROR: Could not build wheels for pyrp3, which is required to install pyproject.toml-based projects
(linien-3.12) PS C:\Users\bastian\Documents\programming\pyrp3> 

@doronbehar
Copy link
Contributor Author

The issue is that pyrp3 cannot be installed on Windows machines, at least not without additional requirements:

OK I see, I also understand that when wishing to install linien-server on a Windows machine that would be an issue. However, if a Windows user really wants to work on the development of linien-server on a Windows machine and they don't have a MS Visual C++ environment setup, they can avoid installing pyrp3, and install all other dependencies manually and simply run:

python linien-server/linien_server/cli.py run --fake

Given that linien-common is installed, and all other pure Python dependencies are installed. Also, it should be possible to construct a python -m piptools compile command like I showed in #378 (comment) that would avoid installing pyrp3 on Windows. This is a command that should work on Bash (and hence not on Windows):

python -m pip download \
  --no-deps \
  /path/to/linien-repo/linien-server \
  --requirement <(python -m piptools compile \
    /path/to/linien-repo/linien-server/pyproject.toml \
    --output-file - 2>/dev/null | sed \
      -e 's/^\(pyrp3==2.0.1\)/#\0 is not available on for Windows.../g' \
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants