Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdist_list plugin to all setup.py #203

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Nov 1, 2016

The sdist_list plugin creates a source distribution file list.

Signed-off-by: Christian Heimes cheimes@redhat.com

@pspacek here is your helper command for automake dist.

@pspacek
Copy link
Contributor

pspacek commented Nov 1, 2016

Thanks for the propsal. It has several problems:

  • It prints extra text at the beginning of output. This makes the output unsuitable for automated processing.
$ python setup.py sdist_list --quiet
running sdist_list
running egg_info
writing freeipa.egg-info/PKG-INFO
writing top-level names to freeipa.egg-info/top_level.txt
writing dependency_links to freeipa.egg-info/dependency_links.txt
reading manifest file 'freeipa.egg-info/SOURCES.txt'
writing manifest file 'freeipa.egg-info/SOURCES.txt'
warning: sdist_list: standard file not found: should have one of README, README.rst, README.txt

running check
/home/pspacek/pkg/ipa/git/ipaserver/__init__.py
  • pylint is failing

I wonder if the printed list is always the same as *.egg-info/SOURCES.txt or not. If it is the same we may very well re-use that file. It seems that egg-info is generated during sdist_list processing anyway ...

@tiran
Copy link
Member Author

tiran commented Nov 1, 2016

You have two options to work around the extra output

  1. redirect stderr and use python setup.py --quiet sdist_list. The order is import, python setup.py sdist_list --quiet only silences sdist_list command, not subcommands.
  2. use the --source-list option to write the source list into a file

The content of SOURCES.txt is not necessarily the same as sdist_list. The sdist command may add additional files after egg_info has creates the file.

The sdist_list plugin creates a source distribution file list.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@pspacek
Copy link
Contributor

pspacek commented Nov 2, 2016

  1. redirect stderr and use python setup.py --quiet sdist_list. The order is import, python setup.py sdist_list --quiet only silences sdist_list command, not subcommands.

Could you fix sdist_list so it properly propagates --quiet option to the subcommands?

@tiran
Copy link
Member Author

tiran commented Nov 2, 2016

There is nothing to fix here. Just use the --source-list argument.

@pspacek
Copy link
Contributor

pspacek commented Nov 2, 2016

There is nothing to fix here. Just use the --source-list argument.
I would rather avoid temporary file and related logic. For this reason I would like to see --quiet option propagated to subcommands. Can it be done?

@tiran
Copy link
Member Author

tiran commented Nov 2, 2016

It can't be done in a clean way. distutils and setuptools starts logging to stdout before the command has a chance to change the log level. I don't want to change the log level globally because it contains useful information.

@tiran
Copy link
Member Author

tiran commented Nov 14, 2016

The feature is no longer required. @pspacek uses egg-info/SOURCES.txt.

@tiran tiran closed this Nov 14, 2016
@tiran tiran deleted the sdist_list branch November 14, 2016 11:06
@MartinBasti MartinBasti added the rejected Pull Request has been rejected label Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Pull Request has been rejected
Projects
None yet
3 participants