Wrong version number reported #101

Closed
opened 2021-11-20 13:23:55 +00:00 by ungleich-gitea · 16 comments

Created by: oxr463

The command cdist -V, or cdist --version report the following version number on the latest release,

cdist v3.9.0-93-g1e2838bc2e

I also checked the version released on PyPI, and it says the same thing. In fact, re-running pip install cdist returns the following,

Requirement already satisfied: cdist in /usr/lib/python3.6/site-packages (v3.9.0-93-g1e2838bc2e)
*Created by: oxr463* The command `cdist -V`, or `cdist --version` report the following version number on the latest release, ```terminal cdist v3.9.0-93-g1e2838bc2e ``` I also checked the version released on PyPI, and it says the same thing. In fact, re-running `pip install cdist` returns the following, ```terminal Requirement already satisfied: cdist in /usr/lib/python3.6/site-packages (v3.9.0-93-g1e2838bc2e) ```
Author
Owner

Created by: darko-poljak

@oxr463 Release 4.10.11 raw source code that was uploaded by our build process should now have version.py included in the archive. If something is wrong, please report a new issue.

*Created by: darko-poljak* @oxr463 Release 4.10.11 raw source code that was uploaded by our build process should now have version.py included in the archive. If something is wrong, please report a new issue.
Author
Owner

Created by: darko-poljak

Thank you for reporting this and to make us make cdist better.

*Created by: darko-poljak* Thank you for reporting this and to make us make cdist better.
Author
Owner

Created by: oxr463

Thank you for your help.

*Created by: oxr463* Thank you for your help.
Author
Owner

Created by: darko-poljak

@oxr463 It should be actual with the next release.

*Created by: darko-poljak* @oxr463 It should be actual with the next release.
Author
Owner

Created by: darko-poljak

@oxr463 We will add version.py into tar.gz we generate, sign and upload to github.
We cannot affect github generated Source code (zip) nor Source code (tar.gz).

*Created by: darko-poljak* @oxr463 We will add version.py into tar.gz we generate, sign and upload to github. We cannot affect github generated `Source code (zip)` nor `Source code (tar.gz)`.
Author
Owner

Created by: oxr463

I can clone from git. Thanks for letting me know!

*Created by: oxr463* I can clone from git. Thanks for letting me know!
Author
Owner

Created by: telmich

Alright.. the answer is VERY easy:

  • .tar.*, deb, pypi, apk, $package should contain version.py
  • git should not contain that

@oxr463 I have not worked w/ alpine packages yet, but can you git (shallow) clone in the build process? This would be the correct way from our side. The tars generated by github are not an official release from my point of view.

*Created by: telmich* Alright.. the answer is VERY easy: * .tar.*, deb, pypi, apk, $package should contain version.py * git should not contain that @oxr463 I have not worked w/ alpine packages yet, but can you git (shallow) clone in the build process? This would be the correct way from our side. The tars generated by github are *not* an official release from my point of view.
Author
Owner

Created by: darko-poljak

@oxr463 Well, if source is not git cloned then there is no git to generate version from.
pypi tar.gz has generated version.py included.
Raw source has no version.py.

@telmich What is the recommended way in this case?
Should we support version.py generation for raw source?

*Created by: darko-poljak* @oxr463 Well, if source is not git cloned then there is no git to generate version from. pypi tar.gz has generated version.py included. Raw source has no version.py. @telmich What is the recommended way in this case? Should we support version.py generation for raw source?
Author
Owner

Created by: oxr463

Here is the latest results,

tar xf cdist-4.10.9.tar.gz
cd cdist-4.10.9
ls
bin  cdist  completions  configuration  docs  hacking  Makefile  MANIFEST.in  other  PKGBUILD.in  README  scripts  setup.py
make version
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
make: *** No rule to make target '.git/refs/heads/master', needed by 'version'.  Stop.
*Created by: oxr463* Here is the latest results, ```terminal tar xf cdist-4.10.9.tar.gz cd cdist-4.10.9 ls bin cdist completions configuration docs hacking Makefile MANIFEST.in other PKGBUILD.in README scripts setup.py make version fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git make: *** No rule to make target '.git/refs/heads/master', needed by 'version'. Stop. ```
Author
Owner

Created by: darko-poljak

@oxr463 What is the final conclusion?

*Created by: darko-poljak* @oxr463 What is the final conclusion?
Author
Owner

Created by: oxr463

Oops! I thought that only applied to the git version. Let me try again.

*Created by: oxr463* Oops! I thought that only applied to the git version. Let me try again.
Author
Owner

Created by: darko-poljak

@oxr463 I think you missed one step when doing it from source:

https://www.nico.schottelius.org/software/cdist/man/latest/cdist-install.html#from-git

To install cdist with distutils from cloned repository, first you have to create version.py:

make version

Then, as usual, you execute the following command:

python setup.py install

cdist does not come with pre-generated version.py.

*Created by: darko-poljak* @oxr463 I think you missed one step when doing it from source: https://www.nico.schottelius.org/software/cdist/man/latest/cdist-install.html#from-git ``` To install cdist with distutils from cloned repository, first you have to create version.py: make version Then, as usual, you execute the following command: python setup.py install ``` cdist does not come with pre-generated version.py.
Author
Owner

Created by: oxr463

Testing again from Gentoo this time,

cdist -V
cdist

No version number at all?

*Created by: oxr463* Testing again from Gentoo this time, ```terminal cdist -V cdist ``` No version number at all?
Author
Owner

Created by: oxr463

I downloaded the tar.gz, unpacked it, then ran python3 setup.py build install.

Here is the APKBUILD for Alpine Linux, https://git.alpinelinux.org/aports/plain/testing/cdist/APKBUILD

*Created by: oxr463* I downloaded the tar.gz, unpacked it, then ran `python3 setup.py build install`. Here is the APKBUILD for Alpine Linux, https://git.alpinelinux.org/aports/plain/testing/cdist/APKBUILD
Author
Owner

Created by: darko-poljak

The command cdist -V, or cdist --version report the following version number on the latest release

@oxr463 How do you install the latest release?

*Created by: darko-poljak* ``` The command cdist -V, or cdist --version report the following version number on the latest release ``` @oxr463 How do you `install` the latest release?
Author
Owner

Created by: darko-poljak

@oxr463 I don't get it.

# pip3 install cdist
Collecting cdist
  Downloading https://files.pythonhosted.org/packages/e9/4f/75f6f39b90b58c00540ab7d1099111a4fst-4.10.9.tar.gz (709kB)
    100% |████████████████████████████████| 716kB 2.6MB/s 
Building wheels for collected packages: cdist
  Running setup.py bdist_wheel for cdist ... done
  Stored in directory: /root/.cache/pip/wheels/74/0a/35/5c559751e4b254f842180fbc523b25fd6e1d8
Successfully built cdist
Installing collected packages: cdist
Successfully installed cdist-4.10.9
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
# cdist -V
cdist 4.10.9

*Created by: darko-poljak* @oxr463 I don't get it. ``` # pip3 install cdist Collecting cdist Downloading https://files.pythonhosted.org/packages/e9/4f/75f6f39b90b58c00540ab7d1099111a4fst-4.10.9.tar.gz (709kB) 100% |████████████████████████████████| 716kB 2.6MB/s Building wheels for collected packages: cdist Running setup.py bdist_wheel for cdist ... done Stored in directory: /root/.cache/pip/wheels/74/0a/35/5c559751e4b254f842180fbc523b25fd6e1d8 Successfully built cdist Installing collected packages: cdist Successfully installed cdist-4.10.9 You are using pip version 18.1, however version 19.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. # cdist -V cdist 4.10.9 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#101
No description provided.