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

How to create a dependency for python 3.8? #1663

Closed
evandrocoan opened this issue Feb 1, 2024 · 6 comments
Closed

How to create a dependency for python 3.8? #1663

evandrocoan opened this issue Feb 1, 2024 · 6 comments
Labels

Comments

@evandrocoan
Copy link

I have a package https://github.com/evandrocoan/RememberCommandPaletteInput which defined the .python-version file. When package control 4 try to install it, it says "depname is not available for Python 3.8". If I remove my .python-version file, the package dependencies are installed normally.

The documentation at https://packagecontrol.io/docs/dependencies does not mention the need of .python-version for dependencies. Does my dependencies need to have the .python-version file also?

@evandrocoan
Copy link
Author

I opened pull-request #1664 fixing reading 'python_versions' from channel data. But is there a simpler way to set a dependency as Python 3.8?

evandrocoan added a commit to evandrocoan/StudioChannel that referenced this issue Feb 2, 2024
@deathaxe
Copy link
Collaborator

deathaxe commented Feb 2, 2024

Dependencies were a special kind of packages to wrap python packages. Any ordinary plugin-like functionality was possible due to their location, but not intentional use.

A proper depedency looks like https://github.com/packagecontrol/example-dependency

Package Control 4 replaces dependencies by libraries with latter ones being ordinary python packages installed to $data/Lib. Dependencies are migrated during upgrade from PC3 to PC4, which means content of proper platform specific sub directory (e.g.: all, st3, ...) is copied to $data/Lib/<library-name> and proper .dist-info directory being created.

Same happens when installing existing dependencies.

Alternatively, ordinary python packages can be installed from pypi.org, with two restrictions:

  1. They need to be registered in a channel as PC does not implement pip like package lookup.
  2. PC 4 does not yet resolve dependencies recursively, like pip.

Example: https://github.com/packagecontrol/channel/blob/02bc2b4cd1f9739f203b9e3003fefca39e8d2a9c/repository.json#L202-L281


That said, local .python-version files are not involved. The only way to mark a dependency compatible for python 3.8 is via upstream channel data.

A concept for ordinary packages to depend on each other is probably possible, but has not been worked at, yet.

evandrocoan added a commit to evandrocoan/StudioChannel that referenced this issue Feb 4, 2024
evandrocoan added a commit to evandrocoan/channelmanager that referenced this issue Feb 4, 2024
@evandrocoan
Copy link
Author

Thanks. I found the schema specification and examples on the main repository. There is no need for a detailed explanation; I would just require a specification as can be found on sublime-package.json so I can know what values are accepted by each field and which fields there are available.
image

It would be nice to update the official documentation to mention package control 4.0 instead of just 3.0: https://packagecontrol.io/docs/dependencies

@FichteFoll
Copy link
Collaborator

Yes, certainly. Unfortunately, the only person who is capable of updating packagecontrol.io is MIA.

@eugenesvk
Copy link

eugenesvk commented Jan 25, 2025

Alternatively, ordinary python packages can be installed from pypi.org, with two restrictions:

  1. They need to be registered in a channel as PC does not implement pip like package lookup.
  2. PC 4 does not yet resolve dependencies recursively, like pip.

By the way, is either of these fixed in or depend on the scheme-4 upgrade wbond/packagecontrol.io#157 or are these separate future improvements?

@deathaxe
Copy link
Collaborator

Package Control 4 adds a new "asset" based release type and a "pypi" client to crawl registered packages from pypi.org. Defining them requires repository/channel scheme v4, which is still not supported by packagecontrol.io at the time of writing this post.

That's the major reason for separate https://github.com/packagecontrol/channel/ being required to be able to provide python 3.8 dependencies at all.

No work has been done so far to integrade recursive dependencies resolver beyond a very naive and basic parser for python "requirements", and it won't probably be as long as Package Control still supports ST3 and python 3.3

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

Successfully merging a pull request may close this issue.

4 participants