Python Forum
Python wheel packages - how to add timestamp to the wheel name? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python wheel packages - how to add timestamp to the wheel name? (/thread-37656.html)



Python wheel packages - how to add timestamp to the wheel name? - vcankovic - Jul-06-2022

I am using Jenkins to create a new build packages for Python. My setup.py file is the following:

setup(
name = "my-package",
version = "1.0.0",
author = "Bob Bob",
description = "test",
packages=['my-package'],
install_requires=['sample1001']
)

We run: python setup.py bdist_wheel The resulting file is the following: my_package-1.0.0-py3-none-any.whl

I know that by simple version change I can impact my wheel package name. But most of the time if some small change is being set we do not want to change the version field, but we would like to add timestamp to the existing name of the wheel package, so that we can have different build file (not to overwrite the previous one),

Can you please tell me - how I can add timestamp to wheel name? I cannot find that info anywhere... what is the usual practice? is the only option to change version field?
I am devops - but developers when they push new python code should not worry about changing the version field in the same time... At least that is how I see it... but please tell me what is the best practice if we do not want to simply just overwrite the existing wheel file?

Thanks a lot!