wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.77k stars 816 forks source link

How to create a dependency for python 3.8? #1663

Closed evandrocoan closed 3 weeks ago

evandrocoan commented 5 months ago

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 commented 5 months ago

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?

deathaxe commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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