Python importing own git projects as packages - version conflicts

31 Views Asked by At

I am having problem with version conflicts in my python application. I have created my own python package with its own .toml file. Let us call it my_package. The .toml file includes other custom created packages made by me.

dependencies = [
        my-package1 @ git+ssh://[email protected]/.../my_package1.git
        my-package2 @ git+ssh://[email protected]/.../my_package2.git
]

Notice that the packages are given without a commit hash which points them to their lates version.

Now in my new python app I try to install the packages in my requirements file but i get dependency conflicts. The requirements.txt file looks like below,

my-package @ git+ssh://[email protected]/.../my_package.git@commit_hash
my-package1 @ git+ssh://[email protected]/.../my_package1.git@commit_hash1

So the version specified in requirements.txt for my-package1 is colliding with the version (latest) specified in my-package .toml file.

I know that this can be solved by for example deleting the commit_hash1 so the versions is the same but then we lose control of the different version. Can someone explain how this should be done.

0

There are 0 best solutions below