Giter Site home page Giter Site logo

Renaming of modules about stickytape HOT 4 CLOSED

mwilliamson avatar mwilliamson commented on July 24, 2024
Renaming of modules

from stickytape.

Comments (4)

mwilliamson avatar mwilliamson commented on July 24, 2024

Could you explain a bit more about the name conflicts you'd get otherwise?

I'd also suggest that there are likely better tools than stickytape to use, depending on your use case, such as zipapp or PyInstaller.

from stickytape.

tjpalmer avatar tjpalmer commented on July 24, 2024

Thanks for the reply!

Specifically, I'm writing a Pygments lexer, but I'm depending on 3rd party packages. Code isn't public right now (though I expect it to be in the future), so I can't show specifics easily. Anyway, given current examples, I suspect they aren't terribly interested in adding 3rd party dependencies for arbitrary lexers. So I figure a single-file bundler might be more acceptable to them.

None of this is a rush, but I was investigating options, and stickytape seems like one of the better ones.

But it looks to me like stickytape adds the bundled things generally such that they are in the virtual python path for all other modules as well. If this is correct, it would be nice to rename them to some subpackage so they don't get exposed generally. But maybe I've misinterpreted this.

If this is ever meaningful, I might also be interested in multiline rendering of the bundled strings, so it's easier to review the included code.

from stickytape.

mwilliamson avatar mwilliamson commented on July 24, 2024

If you want to rename modules, then you probably want to use another tool to vendorise dependencies. I wrote one, python-vendorize, a long time ago, but there are likely better maintained tools out there that do so.

Having said that, I can't say I know much about contributing to Pygments, but I can't imagine they'd be keen to accept to a Python module that, as part of its execution, rewrites the Python path and writes modules out to disk. I'd assume they'd prefer third-party dependencies to be referred to in the usual way rather than embedded in their source code?

Plus, I've been playing around with using zipapp instead of the current approach, which would produce a binary file rather than the current text file.

from stickytape.

tjpalmer avatar tjpalmer commented on July 24, 2024

Yeah, you're probably right about them not being happy with that. I'm mostly just exploring options. Thanks much for the tips! I'll go ahead and close this issue.

from stickytape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.