pfultz2 / cget Goto Github PK
View Code? Open in Web Editor NEWC++ package retrieval
Home Page: http://cget.readthedocs.io
License: Other
C++ package retrieval
Home Page: http://cget.readthedocs.io
License: Other
Hello,
Thanks for the great tool! I've got a quick question.
I see that you have a recipe for catch already. But, it looks like this goes through the process of building a single header file. Instead, I want to download the already made header file from the release tab here. However, when I try
cget install https://github.com/philsquared/Catch/releases/download/v2.0.0-develop.4/catch.hpp --cmake header
I get and error, something like...
Downloading ......
Extracting archive ....
Unexpected error: <class 'tarfile.ReadError'>
file could not be opened successfully
...
Any help is appreciated!
Recipes installed in a requirements file are not immediately available. The following requirements file needs to be ran twice to work.
pfultz2/cget-recipes
xz
The generated cget.cmake
file does include a include_directories(SYSTEM ${CMAKE_PREFIX_PATH}/include)
statement.
However, it would be nice if it included a similar link_directories(${CMAKE_PREFIX_PATH}/lib)
statement.
Right now, I have to add this in my own CMakeLists.txt
, so this is not a problem, just a suggestion.
OSX 10.11.3, python 2.7.10 (from homebrew)
$ cget init --prefix ~/Documents/testcget
Traceback (most recent call last):
File "/usr/local/bin/cget", line 9, in <module>
load_entry_point('cget==0.0.5', 'console_scripts', 'cget')()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cget-0.0.5-py2.7.egg/cget/cli.py", line 32, in w
f(CGetPrefix(prefix, verbose), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cget-0.0.5-py2.7.egg/cget/cli.py", line 43, in init_command
prefix.write_cmake(always_write=True, toolchain=os.path.abspath(toolchain), cxxflags=cxxflags, ldflags=ldflags, std=std)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 360, in abspath
if not isabs(path):
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
Currently, there is no way to override a recipe. That is, if you install recipes from A
and then later want to install recipes from B
that overrides some recipes in A
that is not possible as cget doesn't allow an installation to override a file from another package.
Being able to override a recipe can help make sets of recipes more "composable".
I'm trying to figure out a sane way to allow sys admins to install just the library dependencies of an executable into the build tree, link to the libs statically and then install just the executable into a system path. In this scenario the install prefix for the dependencies is different than the install prefix for the executable. The following does the trick but is a little verbose.
mkdir build
cd build
cget install --file ../requirements.txt --prefix .
cmake -DCMAKE_PREFIX_PATH=`pwd` ..
make
sudo make install # Installs executable to /usr/local
Is there a better way of doing this or are there any ideas on how cget could support this in the future?
Also, is setting CMAKE_PREFIX_PATH to the cget prefix path the recommended way of using cget with IDEs like CLion?
This tool is really awesome, in order to use it for my libraries, I need a way to set CMake variables (especially CMAKE_BUILD_MODE
).
For example like: cget install -DVARIABLE
Your tool don't need to worry about handling different configurations for me, my library does it when installing.
This will help support multi-configuration projects such as Visual Studio, which has incompatible debug and release versions.
This would simplify parsing and it could make it easier to specify multiple aliases.
Using something similar from pip
, like:
-r dev_requirements.txt
On Ubuntu, users could see this:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Which needs the python-dev
package installed.
Specify build variants such as debug, release, shared, and static.
This should display info about package such as dependencies, pkg-config, and cmake find_package
.
First of all, awesome idea! It'd be nice if the requirements file allowed specifying cmake flags to pass onto the dependencies, e.g., -DCMAKE_CXX_FLAGS=...
, etc.
Search installed recipes
Hi,
I like the syntactic sugar you have for packages from github. Would you accept a PR for something similar for bitbucket and gitlab? Maybe something like...
cget install jgm/cmark --github
which would be the same as cget install jgm/cmark
cget install jgm/cmark --bitbucket
cget install jgm/cmark --gitlab
Let me know and I can take a peek at it.
So cget install .
should work, however, this can can cause infinite copying because the cget directory is located in the same directory its trying to install from.
Add a -D
or --define
to specify cmake variables when building an installing a package.
$ cget install simbody/simbody
Failed to build package simbody/simbody
Traceback (most recent call last):
File "/usr/local/bin/cget", line 9, in <module>
load_entry_point('cget==0.0.7', 'console_scripts', 'cget')()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cget-0.0.7-py2.7.egg/cget/cli.py", line 32, in w
f(CGetPrefix(prefix, verbose), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cget-0.0.7-py2.7.egg/cget/cli.py", line 60, in install_command
prefix.remove(pb)
File "/usr/local/lib/python2.7/site-packages/cget-0.0.7-py2.7.egg/cget/prefix.py", line 120, in remove
pkg_dir = self.get_package_directory(pkg.to_fname())
AttributeError: 'unicode' object has no attribute 'to_fname'
Click 5.1.
This can be used to build and test a package.
Hi,
I'm trying to create/install a package from a GitHub repo (that I do not own). The repo already uses CMake as its build system, so that's a positive start at least.
However, it seems the repo also uses git submodules, and therefore expects to have been cloned using the --recursive
flag so that its submodule dependencies are also cloned.
Is there any way of telling cget to do a full recursive clone of the repo, instead of (I believe) downloading the zip archive (which does not include any submodules)?
If not, do you have any suggestions on an alternative approach I could try?
Thanks!
This is to track dependencies that are only needed for building the package.
Running v0.1.2 (the pip version at the time of writing) on Windows 10.
I'd like to fetch and run cmake-gui on a simple CMake-based project, like the one below. However, the following command fails:
> cget build -c https://github.com/ruslo/sugar
Unexpected error: <class 'TypeError'>
Failed to build package https://github.com/ruslo/sugar
It seems that not only the github sources, but every non-local sources will result in failing.
This way removing a test dependency shouldn't remove the packages that were tested with it, since its no longer needed to use the library.
A special flag to ignore the requirements.txt file
Add the ability to install distro-style recipes with -r <recipes>
without a package name, and the ability to install package-level recipes with <pkg> -r <recipe>
.
Since packages are installed in a different directory and then symlinked in, we can CMAKE_STAGING_PREFIX
for this intermediate install directory.
Perhaps the user could write:
somelib --when VAR=On
Hi,
Is there any advice/examples available of best practices for creating a cget recipe for a library that does not already use CMake?
Is there perhaps a way I can "inject" a custom CMakeLists.txt file as part of the recipe? (Or is that thinking about things in the wrong way?)
Thanks!
First, this project looks awesome.
I ran cget install google/googletest
. Everything went fine.
But then I tried to start an empty folder and I wrote a requirements.txt
containing only the line google/googletest
. Then I ran cget install
on the command line and nothing happened.
I am on Windows 10. Am I missing something?
Be able to have a list of packages which should be ignored.
I get the following error:
$ pip install cget
Collecting cget
Could not find a version that satisfies the requirement cget (from versions: )
No matching distribution found for cget
Support a null package source, this will allow meta-package recipes which combine multiple requirements. The question is what should this package be called. It should be something that cannot interfere with another package. Perhaps using a special character like @
or ~
or -
.
Ideally, its not a good idea to add recipes in a requirements.txt, but users may want a single auto-deployment for a project.
So we could have a deploy
command which is like install
but will install the recipes.txt
file first. Also, we could update build
so it reads the recipes.txt
as well.
Additionally, a --no-recipes
flag can be added to disable this behavior.
If a requirements file is available from a recipe, then install requirements first before downloading the current package.
A mechanism to cache downloads
Explicitly specify a cmake file to build a package, something like,
cget install <pkg> --cmake=<cmake-file>
A --test-all
should be used to run the tests for the dependencies.
Right now, we use the filesystem, to store info about the name and its dependants. It might be better to use a db such as sqlite.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.