proton-vpn-gtk-app icon indicating copy to clipboard operation
proton-vpn-gtk-app copied to clipboard

Consider using a monorepo for all python-proton-vpn-* packages

Open ranile opened this issue 1 year ago • 2 comments

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):

  • [x] I have searched open and closed issues for duplicates
  • [x] This isn't a feature request
  • [x] This is not a report about my app not working as expected

The README states:

Virtual environment

If you didn't do it yet, to be able to pip install Proton VPN components you'll need to set up our internal Python package registry. You can do so running the command below, after replacing {GITLAB_TOKEN} with your personal access token with the scope set to api.

pip config set global.index-url https://__token__:{GITLAB_TOKEN}@{GITLAB_INSTANCE}/api/v4/groups/{GROUP_ID}/-/packages/pypi/simple

This makes the job of using running the app from the source code extremely difficult. Moreover, the README also doesn't mention what GitLab instance to use, which makes me think that the instance being used is https://gitlab.com/, a 3rd party service.

I bring this up as I would like an easy way to build/run the app from source without needing to clone a bunch of other repositories or authenticate with GitLab (which doesn't really make sense since the source is on GitHub and pip can install packages from git)

ranile avatar Apr 28 '24 13:04 ranile

According to the ProtonVPN/python-proton-vpn-api-core README:

  • {GITLAB_INSTANCE} should be set to gitlab.protontech.ch
  • {GROUP_ID}should be set to 777

The command then becomes:

pip config set global.index-url https://__token__:{GITLAB_TOKEN}@gitlab.protontech.ch/api/v4/groups/777/-/packages/pypi/simple

However, I get a few errors when trying it:

...
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8c4c59e0d0>, 'Connection to gitlab.protontech.ch timed out. (connect timeout=15)')': /api/v4/groups/777/-/packages/pypi/simple/proton-vpn-api-core/
INFO: pip is looking at multiple versions of proton-vpn-gtk-app to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement proton-vpn-api-core (from proton-vpn-gtk-app) (from versions: none)
ERROR: No matching distribution found for proton-vpn-api-core

Maybe this repo's README could be updated to include the correct information?

elenapan avatar May 07 '24 16:05 elenapan

So repo instructions contain are mainly of developers and internal use. Though to note that we currently don't provide support if you build the app from source, mainly because there are many dependencies that need to be in place. I'll take this info to see if we can improve the README.md file, thanks.

calexandru2018 avatar Jun 18 '24 10:06 calexandru2018

@ranile in recent times we've drastically reduced the repos by half, so at this point you'll have to worry only to install the following packages:

  1. https://github.com/ProtonVPN/python-proton-core

  2. https://github.com/ProtonVPN/python-proton-keyring-linux

  3. https://github.com/ProtonVPN/python-proton-vpn-local-agent

  4. https://github.com/ProtonVPN/python-proton-vpn-api-core

  5. https://github.com/ProtonVPN/python-proton-vpn-network-manager

  6. https://github.com/ProtonVPN/proton-vpn-gtk-app

For now this is what we'll keep, we don't plan to reduce it too much in the near future. Closing the ticket.

calexandru2018 avatar Nov 27 '24 11:11 calexandru2018