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

Get rid of PasteScript depenedency. #6

Open
domenkozar opened this issue Aug 29, 2012 · 8 comments
Open

Get rid of PasteScript depenedency. #6

domenkozar opened this issue Aug 29, 2012 · 8 comments
Labels

Comments

@domenkozar
Copy link
Member

PasteScript/PasteDeploy are dying because noone wants to maintain it. Pyramid actually stripped off templating functionality into pyramid.scaffolds, we could steal their code and integrate into templer.core. Maybe then someday pyramid also depends on templer.core. Opinions?

PS: This could be a nice todo for ploneconf2012 sprints :)

@cewing
Copy link
Member

cewing commented Aug 29, 2012

I was unaware that the pyramid scaffolds had simply pulled the parts of PasteScript they needed out of that package and into their own. At the BBQ sprint a few years back this was heavily discussed and then abandoned as it was too large a project for us to accomplish in the short space of time we had available. However, there are a huge number of issues and problems that the dependency on PasteScript causes us. I agree with this entirely. It would also make the idea of using Jinja2 templates (or any other template system that comes along later) much easier if we were to be rid of PasteScript.

Could someone take a look into this? Perhaps a branch or fork of this repo to start work on this? All the dependencies of the templer system on PasteScript should be localized to this one package, so we should not need to do more than fix this, leaving the API of this package untouched and we'll have it.

@cewing
Copy link
Member

cewing commented Nov 1, 2012

The branch is started. All that remains is getting localcommands back. And most of that is actually just command-line management. See the drop_pastescript_dependency branch of this repo

@domenkozar
Copy link
Member Author

Are you still working on localcommands? That's all we need to make a new release, right?

@cewing
Copy link
Member

cewing commented Nov 3, 2012

I am, yes. But it's not going swiftly. Time is not easy to find. I would like to delay a new full release of all templer packages until I can get that working. It'd be really really nice to have that in place.

Basically, I am in the midst of trying to make the original command-line syntax work without having paster at all. This means that we need to support the following use-cases (after creating package foo.bar which has localcommands available):

$ cd foo.bar/src
$ templer add --list  (would show the available local commands for this package)
$ templer add browserview (would execute the browserview localcommand)

So the 'templer' command needs to be able to support this second-level command syntax. It has to be able to know if add is a valid option to pass in the context (if the created package does not support local commands, the add option is not available). It has to support existing command options for add, like --list.

The proper handling of this command-line interaction is where I'm hung up at the moment. Once this is working, then refining the actual running scripts is a fairly simple thing (at least I hope so).

@domenkozar
Copy link
Member Author

Roger. I'm currently swamped with work, in free time working on mr.bob and fundhub.org

Nevertheless, I can help with thinking.

Maybe if we detect 'templer add' in sys.argv, different arguments parser is used? That would make our life easier?

@cewing
Copy link
Member

cewing commented Nov 3, 2012

So totally understand the swamped thing.

I like that idea. I hadn't considered swapping out arg parsers. That bears some serious consideration.

Thanks, @iElectric

@cewing
Copy link
Member

cewing commented Nov 17, 2012

This issue on templer.dexterity highlights our continuing pain with the Paste dependency. Because local commands are implemented as Paste plugins, a package generated by templer needs to be 'installed' in order for local commands to work. However, if that package declares a dependency on some package (like the dexterity package does on plone.app.dexterity), then that package would also need to be 'installed' in order for the newly created package to properly load Paste plugins.

Effectively, this means you have to install your package in a full buildout before you can even try to run local commands, and it probably means that even that won't work, as the dependencies of the package would not necessarily exist in the working set that Paste sees.

We have to fix this. It is becoming more and more urgent

@pigeonflight
Copy link
Member

Checking in, any progress with this bug? The localcommands Paste dependency "circle" is killing me at the moment. How many hours would one need to dedicate to fixing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants