| You can see the contents of the generated file like this:: | ||
|
|
||
| tar xvfz dist/my-package-1.0.0.tar.gz -O | cat */PKG-INFO | ||
| tar xfz dist/my-package-1.0.0.tar.gz --wildcards --no-wildcards-match-slash -O '*/PKG-INFO' |
There was a problem hiding this comment.
Using tar xfO dist/my-package-1.0.0.tar.gz */PKG-INFO would be simpler.
Sorry, something went wrong.
There was a problem hiding this comment.
Is the omission of --wildcards in your command intentional? tar on Ubuntu Xenial requires that option in order to enable pattern matching.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, nope, my tar must work differently (I'm using bsdtar 2.8.3). I get a tar: Option --wildcards is not supported trying to use that flag.
Sorry, something went wrong.
There was a problem hiding this comment.
I believe the lowest common denominator command would be tar xfO dist/my-package-1.0.0.tar.gz my-package-1.0.0/PKG-INFO, with the user typing out the project name & version twice. Should we go with that?
Sorry, something went wrong.
There was a problem hiding this comment.
For what it's worth, Windows 10 has tar available by default (at least the version I have does) - it's bsdtar 3.3.2 and that does support wildcards without needing an option. Specifically, tar xfO dist/my-package-1.0.0.tar.gz */PKG-INFO works.
Older versions of Windows almost certainly don't have tar, though.
Sorry, something went wrong.
There was a problem hiding this comment.
One problem with using wildcards, though - building a sdist appears to create a .egg-info directory that contains a copy of the metadata, so tar output (with wildcards) gets duplicated.
So the explicit version is probably better anyway.
Sorry, something went wrong.
In the "Dropping support for older Python versions" guide, the tar command given for showing the sdist's metadata does not work (unless you happen to run it in your project directory without cleaning up your .egg-info dir first, in which case it only works by accident and the tar is pointless). This pull request changes the command to something that does work.