Re: [Repoze-dev] bfg vs buildout
Shane Hathaway wrote: I'm not very familiar with pip, but I don't think that's an issue for Buildout. Buildout also has the ability to pin the version of all packages, but I don't think that's what Jens and I want in this case. yep, the only thing buildout is missing is a command to dump the versions.cfg based on what's in the current buildout... We want an authority to provide a regularly updated list of Repoze package versions known to probably work together. Thankfully, the BFG index is serving that purpose, except that it's not easy to combine that list with the rest of PyPI. I think the problem would be solved if that index took the form of a versions.cfg (auto-generated would be fine). Yep, I wonder if Chris could be tickled to put your auto-generator up somewhere on dist.repoze.org? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
On 6/25/09 3:38 AM, Chris Withers wrote: Shane Hathaway wrote: I'm not very familiar with pip, but I don't think that's an issue for Buildout. Buildout also has the ability to pin the version of all packages, but I don't think that's what Jens and I want in this case. yep, the only thing buildout is missing is a command to dump the versions.cfg based on what's in the current buildout... We want an authority to provide a regularly updated list of Repoze package versions known to probably work together. Thankfully, the BFG index is serving that purpose, except that it's not easy to combine that list with the rest of PyPI. I think the problem would be solved if that index took the form of a versions.cfg (auto-generated would be fine). Yep, I wonder if Chris could be tickled to put your auto-generator up somewhere on dist.repoze.org? I think it's a good idea. It's also an eminently doable-by-someone-else job (wget + the script). I don't really use version.cfg files, so I'd be an unlikely candidate to keep it running properly. I'd forget about its existence and it would just stop working. OTOH, if someone else wanted to keep an index mirror up and generate a versions.cfg, and wget-against-the-index wasn't sufficient for some reason, I'd do the necessary sysadmin stuff to get them rsync access to the files (or really whatever was necessary). - C ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Am Wed, 24 Jun 2009 10:54:33 +0100 schrieb Chris Withers: Hey All, Just been reading http://docs.repoze.org/bfg/narr/install.html and I notice a conspicuous absence of zc.buildout... Do you guys recommend not using buildout? If not, are there docs anywhere for using BFG in a buildout context? I do use zc.buildout. Here an minimal example: - [buildout] extensions = buildout.dumppickedversions parts = instance eggs-directory = ${buildout:directory}/eggs find-links = http://dist.repoze.org/bfg/1.0/ [instance] recipe = repoze.recipe.egg:scripts eggs = repoze.bfg Missing is a version fixation like done in ZTK, Grok, Plone, ... I'd really like to see such a version.cfg for each repoze release. Creation could be automated. hth greetz -- Jens W. Klein - Klein Partner KEG - BlueDynamics Alliance ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Jens W. Klein wrote: - [buildout] extensions = buildout.dumppickedversions parts = instance eggs-directory = ${buildout:directory}/eggs find-links = http://dist.repoze.org/bfg/1.0/ [instance] recipe = repoze.recipe.egg:scripts eggs = repoze.bfg Missing is a version fixation like done in ZTK, Grok, Plone, ... I'd really like to see such a version.cfg for each repoze release. Creation could be automated. Why don't you just replace find-links with index? Also, how do you wire running tests, particularly running them with nose, into this? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
On Wed, Jun 24, 2009 at 9:16 AM, Chris Withers ch...@simplistix.co.ukwrote: Also, how do you wire running tests, particularly running them with nose, into this? bin/nosetests path/to/src Chris ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Chris Rossi wrote: On Wed, Jun 24, 2009 at 9:16 AM, Chris Withers ch...@simplistix.co.uk mailto:ch...@simplistix.co.uk wrote: Also, how do you wire running tests, particularly running them with nose, into this? bin/nosetests path/to/src ...having added nosetests as a dependent egg, right? How/where do you encapsulate options to nosetests such that they don't have to be continuously re-typed? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jens W. Klein wrote: Am Wed, 24 Jun 2009 10:54:33 +0100 schrieb Chris Withers: Hey All, Just been reading http://docs.repoze.org/bfg/narr/install.html and I notice a conspicuous absence of zc.buildout... Do you guys recommend not using buildout? If not, are there docs anywhere for using BFG in a buildout context? I do use zc.buildout. Here an minimal example: - [buildout] extensions = buildout.dumppickedversions parts = instance eggs-directory = ${buildout:directory}/eggs find-links = http://dist.repoze.org/bfg/1.0/ [instance] recipe = repoze.recipe.egg:scripts eggs = repoze.bfg Missing is a version fixation like done in ZTK, Grok, Plone, ... I'd really like to see such a version.cfg for each repoze release. Creation could be automated. You shouldn't need to pin the versions if you would use the index as an index: index = http://dist.repoze.org/bfg/1.0/simple That index is a known good set for the 1.0 release line of BFG. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKQjEy+gerLs4ltQ4RAoIlAJoCoQ6jPYE7jW06AmEJdLCe+XjkeACfTNUZ tEG4Ry4RTK9DJou+AYEGTJ0= =k5wN -END PGP SIGNATURE- ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Chris Rossi wrote: (karl3)ch...@opportunity:~/proj/karl3/src/karl$ cat test ../../bin/nosetests $* So, we just do: $ cd src/karl $ ./test Hackish, but I guess functional. Sadly not cross platform. I wonder if a little buildout recipe is in order? I see: http://pypi.python.org/pypi/pbp.recipe.noserunner ...but this doesn't seem to be much more than a wrapper around zc.recipe.egg and doesn't offer any way to store nose config options in buildout.cfg. cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Jens W. Klein wrote: Am Wed, 24 Jun 2009 09:59:14 -0400 schrieb Tres Seaver: [..] Missing is a version fixation like done in ZTK, Grok, Plone, ... I'd really like to see such a version.cfg for each repoze release. Creation could be automated. You shouldn't need to pin the versions if you would use the index as an index: index = http://dist.repoze.org/bfg/1.0/simple That index is a known good set for the 1.0 release line of BFG. If one uses only stuff from the given index it works. Now, using stuff from pypi like repoze.what make live difficult using an own index server. I agree it's useful to have a versions.cfg, so I wrote a WSGI script that generates a versions.cfg from a package index. I have attached it. It probably needs some battle testing and TLC. Shane URI = 'http://dist.repoze.org/bfg/1.0/' import lxml.html import os import pkg_resources import urlparse def application(environ, start_response): packages = get_index_versions(URI) lines = ['[versions]'] for pkg_name, version in sorted(packages.items()): lines.append('%s = %s' % (pkg_name, version)) text = '\n'.join(lines) start_response([ ('Content-Type', 'text/plain'), ('Content-Length', str(len(text))), ]) return [text] def get_index_versions(uri): packages = {} # pkg_name - [(parsed version, version)] doc = lxml.html.parse(uri) for e in doc.findall('//a'): href = e.get('href') if not href: continue path = urlparse.urlsplit(href)[2] parts = filter(None, path.split('/')) if not parts: continue basename, ext = os.path.splitext(parts[-1]) ext = ext.lower() if ext == '.egg': # remove the '-pyX.Y-Z' suffixes basename = '-'.join(basename.split('-')[:-2]) elif ext in ('.gz', '.bz2'): basename, ext = os.path.splitext(basename) ext = ext.lower() if ext not in ('.tar', '.zip', '.egg', '.tgz', '.tbz2'): continue pkg_name, version = basename.split('-', 1) parsed_version = pkg_resources.parse_version(version) versions = packages.setdefault(pkg_name, []) versions.append((parsed_version, version)) res = {} for pkg_name, versions in packages.items(): versions.sort() res[pkg_name] = versions[-1][1] return res if __name__ == '__main__': print ''.join(application({}, lambda headers: None)) ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
z...@kevinkal.com wrote: I've become a big fan of pip. The --freeze option is great. It seems that it lets you pin your versions all the way down. I'm just watching all of the pain with certain buildout recipes where I could imagine them easier to create if the person creating the recipe had the possibility to pin every version easily. I'm not very familiar with pip, but I don't think that's an issue for Buildout. Buildout also has the ability to pin the version of all packages, but I don't think that's what Jens and I want in this case. We want an authority to provide a regularly updated list of Repoze package versions known to probably work together. Thankfully, the BFG index is serving that purpose, except that it's not easy to combine that list with the rest of PyPI. I think the problem would be solved if that index took the form of a versions.cfg (auto-generated would be fine). Shane ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] bfg vs buildout
Hi Shane, z...@kevinkal.com wrote: I've become a big fan of pip. The --freeze option is great. It seems that it lets you pin your versions all the way down. I'm just watching all of the pain with certain buildout recipes where I could imagine them easier to create if the person creating the recipe had the possibility to pin every version easily. I'm not very familiar with pip, pip, I don't think is a competator for buildout, but an alternative for easyinstall but I don't think that's an issue for Buildout. Buildout also has the ability to pin the version of all packages, but I don't think that's what Jens and I want in this case. We want an authority to provide a regularly updated list of Repoze package versions known to probably work together. Thankfully, the BFG index is serving that purpose, Ok, I may have missed the main point of this thread, but ... :-) except that it's not easy to combine that list with the rest of PyPI. I thought it was more about this - which pip can help with. bin/pip --freeze produces a list of all eggs in pip's path. One could do a pip --freeze versions.cfg There is a buildout recipe that uses pip - http://pypi.python.org/pypi/gp.recipe.pip .d I think the problem would be solved if that index took the form of a versions.cfg (auto-generated would be fine). Shane Again - I'm not sure how far off the point I am with this thread, but when I see buildout mentioned I think of the serious troubles I have had with certain popular recipes and wish that the help with pinning that pip brings to the table would be taken advantage of. Cheers! -Kevin ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev