versioning

A build-system independent way to get the version from a package source directory

A build-system independent way to get the version from a package source directory Question: There are many different ways that Python packages manage their version data. Is there a build-system independent way to extract the version from a package source directory? I’m aware of the PEP 517 compatible Python package builder build which does this …

Total answers: 1

Specify dependency version >= for git repository in pyproject.toml

Specify dependency version >= for git repository in pyproject.toml Question: I have a python project with all dependencies and versions managed by pyproject.toml file. One of these dependencies is a git reference: [project] name = ‘my_package’ version = ‘1.0.0’ dependencies = [ ‘my_dependency @ git+https://github.com/some_user/some_repo.git’ ] In order to improve version management after some time …

Total answers: 1

Can't find module cPickle using Python 3.5 and Anaconda

Can't find module cPickle using Python 3.5 and Anaconda Question: I am trying to use cPickle on a windows box, using Anaconda. I am using python 3.5. I am not using a virtualenv (though probably should be). When I try to import cPickle I get “ImportError: No module named ‘cPickle’” Python 3.5.0 |Anaconda custom (64-bit)| …

Total answers: 2

Should I pin my Python dependencies versions?

Should I pin my Python dependencies versions? Question: I am about to release a Python library I’ve been working on the past few weeks. I’ve read a lot about Python dependencies but something is not quite clear yet: Some people pretend you should never pin your dependencies versions as it would prevent the users of …

Total answers: 3

Determining the latest version of a file (python)

Determining the latest version of a file (python) Question: This has me stumped… I have a list of files in a folder. Eg. myFiles = [“apple_d_v01.jpg”, “apple_d_v02.jpg”, “apple_d_v03.jpg”, “something_d.jpg”, “anotherthing_d.jpg”] There are three versions of the file “apple_d”, using a version suffix of “_vxx”. I want to be able to modify the list to have …

Total answers: 5