version in setup.cfg

J

Jasiu

Hi guys,

I have a question about setup.py and setup.cfg:

I work in a company and we use Subversion to keep our stuff. We have a
post-commit rule that does the following: whenever there is a commit
to /tags/ directory, a binary package is built automatically. The
tag's name is the new version of the package, i.e. tag names are
something like /tags/1.5.2, /tags/1.2.3 etc. We use setup.py to create
packages. In setup.py we set the version of the package by specifying
'version' keyword argument to setup function. We have automated builds
and our post-commit script does kind of ugly regexp hack and replaces
string "version='...'" with version that is guessed from the tag name.
And I wonder: It would be much cleaner if the version could be placed
in the setup.cfg file. Is that possible?

Thanks,

Mike
 
D

Diez B. Roggisch

Jasiu said:
Hi guys,

I have a question about setup.py and setup.cfg:

I work in a company and we use Subversion to keep our stuff. We have a
post-commit rule that does the following: whenever there is a commit
to /tags/ directory, a binary package is built automatically. The
tag's name is the new version of the package, i.e. tag names are
something like /tags/1.5.2, /tags/1.2.3 etc. We use setup.py to create
packages. In setup.py we set the version of the package by specifying
'version' keyword argument to setup function. We have automated builds
and our post-commit script does kind of ugly regexp hack and replaces
string "version='...'" with version that is guessed from the tag name.
And I wonder: It would be much cleaner if the version could be placed
in the setup.cfg file. Is that possible?

I don't think so. But there are several other options:

- install pysvn & use that in setup.py to extract the tag from the
working-copy, making it part of version

- instead of the dirty hack, use an a little bit less ugly hack to
write that version to a file in the WC, and open & read that within setup.py

Diez
 
J

Jasiu

I don't think so. But there are several other options:

I was afraid of that.

Thanks anyway!

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top