Comments (7)
(Somehow, the false ticket on Lexicon, this one, and the above -- all number 4!)
from invoke.
Posted some thoughts on the matter. I doubt I'll get any seriously worldview-changing feedback, but do want to see what comes up.
Truly torn on what I think is the right choice for us re: Fluidity. Leaning towards vendorizing because of the "can work standalone" angle for this type of tool; though I will probably look at each new dependency independently. Anything with high turnover (e.g. Clint) will almost definitely work best non-vendorized.
from invoke.
Yea. Going to try vendorizing things for now (maybe using subtree merging to help with the pain of keeping up with external modules) with a strong possibility of undoing that (and using e.g. Github tarball URLs, which it turns out setuptools can use, pip isn't absolutely required) before 1.0.
from invoke.
I don't know why this is closed, I don't think I actually pulled down/vendorized Fluidity yet (it's not in the source tree.) I do still think vendorizing it is the right approach though.
from invoke.
Tried starting out w/ the git subtree merge
approach (good explanation here), where you basically:
- Add a remote to the dependency's repo, and a branch based on that repo's e.g.
master
(which is a "branch" in name only as it looks like the dep, not your project); - Use e.g.
git read-tree --prefix vendor/fluidity -u fluidity_branch
to write out a branch from that remote/repo into a subdirectory of your actual project; - Commit that initial read/dump to start;
- To obtain updates,
git merge -s subtree --squash --no-commit fluidity_branch
, which is similar to the initialread-tree
in that you get one big rolled-up commit representing multiple upstream commits.
Unfortunately: this approach results in the dep's top level source directory inside your e.g. vendor/fluidity/
folder. Which is not a valid Python subpackage (that would be e.g. vendor/fluidity/fluidity
) and thus can't be imported via e.g. import invoke.vendor.fluidity
.
Poking for solutions now, but given that this approach essentially skips using Git's history mechanisms anyway, I don't see what we really gain over just:
- Stick a checkout of
fluidity
in my projects folder; - Manually copy its
fluidity
Python package folder intoinvoke/vendor/fluidity
, noting somewhere which commit it was; - Commit that.
- To get updates,
cd my_copy_of_fluidity; git diff $PREV_COMMIT > lol.patch; cd invoke/vendor; patch lol.patch
or similar (and then update$PREV_COMMIT
).
Git submodules would take care of the $PREV_COMMIT
tracking business, but requires downstream devs or anybody trying to do pip install -e https://github.com/my/project#blahblah
to take extra steps, or maybe even be hosed. Also may still not allow selecting a specific subdir of the target repo, I forget.
Again, this is under active investigation.
from invoke.
To do:
- Whip up some
tasks.py
tasks to automate updating the vendored stuff (a la rails Rakefiles...heh) - Pull down some initial vendorizations of Fluidity and Pexpect
- Ensure we are doing the right thing re: those projects' licenses: is simply preserving their LICENSE files within their source trees sufficient, do we need to pull them into our root folder, explicitly mention them in our README, ???
- E.g. Requests appears to have licensing info at the top of every file within his
packages/*
vendorized directories, but that appears to be just how the upstream packages are normally. - For packages that (like I like to do) just have one LICENSE file in their source distribution, that means we have to make copying that license part of our vendorization process.
- Fluidity is one of these
- Pexpect has the license embedded in its header (and is also effectively a single module distribution) in addition to a standalone LICENSE file. Sounds like easiest is probably just to stick
pexpect.py
invendor/
by itself.
- E.g. Requests appears to have licensing info at the top of every file within his
from invoke.
I have performed the initial vendorizing here and it works OK for new installs. The "update/redo my vendored deps" task is still just a skeleton of comments, but that can be fleshed out whenever I actually need to upgrade something.
from invoke.
Related Issues (20)
- Change default shell without a config file or Context? HOT 3
- Task decorator removes docstring HOT 1
- Run tasks relative to `tasks.py` HOT 2
- How to manually set short flags? HOT 1
- context.run(): Expose API to pass command and separate args instead of a single string HOT 2
- Specify a config file per Collection... possible?
- Collection mix-up when cross importing invoke tasks
- Running post tasks even if the main task fail
- `--help` after the command treats `--help` as positional argument HOT 2
- Is there support for making invoke.yaml context settings cli flags?
- EncodeWarning's when running on python >= 3.11
- @task(pre=[call(setup, 'qwe')]) fails with "NameError: name 'call' is not defined" HOT 1
- Config run should handle shell paths with spaces HOT 2
- Is it possible to only mock one command and run the rest with MockContext?
- autoprint generators correctly
- Generate help infomation of task args from function docstring.
- Importing Python modules from a scripts directory beside the tasks directory
- Recommended way to forward arguments to commands HOT 2
- Printing Promise objects from asynchronous Runner.run() raises Attribute Error
- Sudo showing password in clear
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 invoke.