Comments (4)
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.
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.
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.
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)
- Library to script conversion possible? HOT 4
- Dynamic imports don't work if the python path is a level up from their location HOT 2
- PermissionError: [WinError 5] Access is denied Error in Windows environment HOT 3
- How to "make" HOT 2
- Holding of the __init__.py during 'make_package' cause failure on exit (Windows + IronPython)
- Using sticky tape to pass code to external engine HOT 1
- Output file still want to import files HOT 20
- from __future__ import unicode_literals HOT 12
- Relative imports matching stdlib modules are incorrectly ignored HOT 1
- Improve list of stdlib modules
- Handle relative imports from parent packages HOT 1
- UnicodeEncodeError: 'charmap' codec can't encode characters in position 83853-83854 HOT 13
- Relative import still doesn't work? HOT 4
- SyntaxError: Non-UTF-8 code starting with '\xff' HOT 1
- How to include Python standard library HOT 1
- Explicitly add modules inline HOT 1
- Move future statements at the top HOT 2
- how to convert many py files to a py file without make tempfile HOT 1
- when i exec a cmpiled file in a cmpiled file ,raise NameError: global name '__stickytape_working_dir' is not defined HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stickytape.