Git Product home page Git Product logo

Comments (6)

pfultz2 avatar pfultz2 commented on May 24, 2024

Interesting, I've never thought of a use case for non-local sources for the build command, so I have never tested. Let me look into fixing this. However, for it to work even after a fix you will need to give a correct url, like cget build -c https://github.com/ruslo/sugar/archive/master.tar.gz or cget build -c ruslo/sugar

from cget.

pfultz2 avatar pfultz2 commented on May 24, 2024

Looking at this more, I am not sure exactly how this will work, as there needs to be a local source directory for cmake. On the install command, it creates a temporary directory to copy the source directory from remote urls, and then it deletes the temporary directory after install finishes. The build command could do the same thing, but it seems very inefficient, as it will download a new source every time. It seems better to just do:

git clone https://github.com/ruslo/sugar
cget build -c sugar

Is there a reason this is not useful for your use case?

from cget.

nedforge avatar nedforge commented on May 24, 2024

The particular use case that is close to mine is following:

  1. I want to fetch and cmake-gui some package P.
  2. P has lots of dependencies and It is described by an external recipe R.
  3. I want cget to handle the dependencies as well as running the CMake.

If R directs to the local source then it will have no issues, but it does not make much sense. Then one needs to manually fetch the repo of P, then copy requirements.txt from R to the repo, and then build it via cget. This is a bit cumbersome, and moreover, resulting in modifying the repo itself. So it would be handy to avoid such situation.

As a suggestion, I think there should be some options to leave intermediate files anyway for both install and build commands, since it's quite often the case that one needs to review which CMake options have been applied to each dependent package, e.g. finding collision of std. library versions. Once that option becomes available, leaving them for the remote source can be easily done, I guess.

from cget.

pfultz2 avatar pfultz2 commented on May 24, 2024

The particular use case that is close to mine is following:

I want to fetch and cmake-gui some package P.
P has lots of dependencies and It is described by an external recipe R.
I want cget to handle the dependencies as well as running the CMake.

That makes a lot of sense. So instead of having cget build take a non-local source directory, instead an extra flag(such as --from or --fetch) could be given to fetch the sources and then they will be stored in the source directory set by cget build, something like this:

cget build -c . --fetch ruslo/sugar@master

Of course, this doesn't fetch the git repository as cget doesn't ever use git. Alternatively, I could add a flag to install that will just install the dependencies of a recipe rather than installing the recipes. So you could clone the repo and install the dependencies from the external recipe.

from cget.

nedforge avatar nedforge commented on May 24, 2024

Either way would work.

from cget.

pfultz2 avatar pfultz2 commented on May 24, 2024

So I added the --fetch flag on the fetch branch already. Right now, there seems to be a problem with long names on windows, so I haven't merged it in yet.

from cget.

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.