I try to create a zipped source python package on a linux distribution without specifying the --formats
option to sdist on the command line (using an existing Jenkins pipeline which do not support this option). In the documentation here , it states:
(assuming you haven't specified any sdist options in the setup script or config file), sdist creates the archive of the default format for the current platform. The default format is a gzip'ed tar file (.tar.gz) on Unix, and ZIP file on Windows.
But it doesn't say how should you specify sdist options in the setup script?
From the linked documentation previous topic :
The basic syntax of the configuration file is simple:
[command] option=value ...
where command is one of the Distutils commands (eg build_py, install), and option is one of the options that command supports
and later an example for build_ext --inplace
[build_ext] inplace=1
That means that you must write into the setup.cfg
file:
[sdist]
format=xxx
Beware: untested because I have no available Python2...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.