This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pysetup create: ask before moving an existing setup.cfg
Type: enhancement Stage: resolved
Components: Distutils2 Versions: Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: tarek Nosy List: Arfrever, alexis, barry, eric.araujo, tarek
Priority: normal Keywords:

Created on 2011-06-14 20:57 by barry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg138348 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-06-14 20:57
I have both a setup.py and a setup.cfg in my package.  I wanted to use `pysetup create` to add the new packaging stanzas to my setup.cfg, but instead, pysetup clobbered everything.  I think it should instead append (or prepend) the new stuff to the existing file.
msg138373 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-15 14:04
Well, create is not update :)  In its current form, create will save an existing setup.cfg as setup.cfg.old and generate a new one.  The human operator will then have to merge both files if necessary.  Automatically merging the old file into the new one would raise issues with respect to comments, whitespace and all that in Pythons < 3.2.

The doc and help messages are probably unclear about that.
msg138375 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-06-15 14:34
On Jun 15, 2011, at 02:04 PM, Éric Araujo wrote:

>Well, create is not update :) In its current form, create will save an
>existing setup.cfg as setup.cfg.old and generate a new one.  The human
>operator will then have to merge both files if necessary.  Automatically
>merging the old file into the new one would raise issues with respect to
>comments, whitespace and all that in Pythons < 3.2.
>
>The doc and help messages are probably unclear about that.

I missed the setup.cfg.old.  I think that's fine.  Probably `create` should
print a message that it moved setup.cfg to setup.cfg.old.
msg138376 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-06-15 14:36
I find this behavior a bit awkward. Maybe we should ask first if it's ok to create a new setup.cfg and rename the old one, *before* doing it.
msg138377 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-15 14:40
> Maybe we should ask first if it's ok to create a new setup.cfg and
> rename the old one, *before* doing it.

Agreed, if “yes” is the default answer.
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56544
2014-03-13 03:57:47eric.araujosetstatus: open -> closed
resolution: out of date
stage: resolved
2011-06-15 14:40:57eric.araujosettype: enhancement
messages: + msg138377
title: pysetup create will clobber an existing setup.cfg -> pysetup create: ask before moving an existing setup.cfg
2011-06-15 14:36:24tareksetmessages: + msg138376
2011-06-15 14:34:12barrysetmessages: + msg138375
2011-06-15 14:04:14eric.araujosetnosy: + tarek, eric.araujo, alexis
messages: + msg138373

assignee: tarek
components: + Distutils2, - Library (Lib)
2011-06-14 21:09:05Arfreversetnosy: + Arfrever
2011-06-14 20:57:30barrycreate