Closed DepthDeluxe closed 6 years ago
Perhaps the setup.py
should throw an exception when that version value is missing?
@cenkalti looks like you pushed a new version today.
Yesterday, I have automated uploading the package to PyPI via Travis.
When Travis build is triggered, the package version is read from the git tag and written into VERSION
file by Travis. See: https://github.com/cenkalti/putio.py/blob/f94e942884981979702b207431e1c22f65470f3d/.travis.yml#L6
However, I still want the package to be installed from sources other than PyPI. That's why I make it to fallback to 0
instead of raising exception. Do you have other suggestion to the problem?
0
seems to me like "development version". I think the correct way of downloading the package should be PyPI.
I think before_deploy gets triggered after the package build. I think you want to use before_script instead which will trigger before your build script executes.
My guess is the file is getting written after your package build so it is using the 0 version.
I see what you mean about the dev version, that def makes sense. You can’t even test/develop the package otherwise. Another option could be trying to read the hash of the latest git commit so at least there is a unique version when you build.
On Tue, Mar 20, 2018 at 1:15 AM Cenk Altı notifications@github.com wrote:
Yesterday, I have automated uploading the package to PyPI via Travis. When Travis build is triggered, the package version is read from the git tag and written into VERSION file by Travis. See: https://github.com/cenkalti/putio.py/blob/f94e942884981979702b207431e1c22f65470f3d/.travis.yml#L6
However, I still want the package to be installed from sources other than PyPI. That's why I make it to fallback to 0 instead of raising exception. Do you have other suggestion to the problem?
0 seems to me like "development version". I think the correct way of downloading the package should be PyPI.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cenkalti/putio.py/issues/38#issuecomment-374510827, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwOCySoxXzzSAvxVrE_7wnD7dBYuu-iks5tgLqngaJpZM4SxKpK .
-- -- Colin
If the environment variable is actually there, another option could be just directly referencing it in the setup.py
import os os.environ.get(‘TRAVIS_VERSION’, 0)
On Tue, Mar 20, 2018 at 7:10 AM Colin Heinzmann colin@heinzmann.me wrote:
I think before_deploy gets triggered after the package build. I think you want to use before_script instead which will trigger before your build script executes.
My guess is the file is getting written after your package build so it is using the 0 version.
I see what you mean about the dev version, that def makes sense. You can’t even test/develop the package otherwise. Another option could be trying to read the hash of the latest git commit so at least there is a unique version when you build.
On Tue, Mar 20, 2018 at 1:15 AM Cenk Altı notifications@github.com wrote:
Yesterday, I have automated uploading the package to PyPI via Travis. When Travis build is triggered, the package version is read from the git tag and written into VERSION file by Travis. See: https://github.com/cenkalti/putio.py/blob/f94e942884981979702b207431e1c22f65470f3d/.travis.yml#L6
However, I still want the package to be installed from sources other than PyPI. That's why I make it to fallback to 0 instead of raising exception. Do you have other suggestion to the problem?
0 seems to me like "development version". I think the correct way of downloading the package should be PyPI.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cenkalti/putio.py/issues/38#issuecomment-374510827, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwOCySoxXzzSAvxVrE_7wnD7dBYuu-iks5tgLqngaJpZM4SxKpK .
-- -- Colin
-- -- Colin
Oh, now I understand the problem. The VERSION
file was not included in the package. Fixed in 2ca9c0dc8f0e998a705db734cd0dd6d6ba2071e1. Now, you should be able to install 8.1.5 from PyPI without any problem.
I am closing this issue. Feel free to write if you have questions.
It looks like the current version of putio.py,
8.1.4
has an invalid version. Likely due to the following code insetup.py
. The version is now0
.Example after running
pip install putio.py==8.1.4
When installing the previous version, I see the valid version (
pip install putio.py==8.1.0
)