bake version requirements hard into setup.py
Bug #332974 reported by
Derek Richardson
This bug report was converted into a question: question #132108: bake version requirements hard into setup.py.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Invalid
|
Undecided
|
Unassigned |
Bug Description
it would
> be nice if grokproject could optionally generate a setup.py with
> versions pinned appropiately for packaging a project as an egg. That way
> it's easy for others with needs like ours to do what is necessary to
> incorporate a new grok project into an existing wsgi app. This seems to
> go well with the current initiative of moving the paster integration
> code (startup.py, etc) into an egg and out of grokproject templates.
To post a comment you must log in.
An easy way to handle this is to take advantage of the fact that setup.py determines it's metadata when it's run. Adding a function at the top of setup.py that reads:
def read_versions(): cfg'): '=','== ')
versions. append( line)
versions = []
for line in open('versions.
line = line.rstrip('\r\n')
if line == "[versions]": continue
line = line.replace(
return versions
Then change install_requires to read:
install_ requires= read_versions( )
This should let you use the existing 'versions.cfg' file listing of pinned eggs that need to be installed for Grok, but use those pinned version for setuptools installed apps.