Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recipe for htop #1598

Merged
merged 14 commits into from
Sep 20, 2016
Merged

Added recipe for htop #1598

merged 14 commits into from
Sep 20, 2016

Conversation

keuv-grvl
Copy link
Contributor

No description provided.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/htop) and found some lint.

Here's what I've got...

For recipes/htop:

  • The recipe could do with some maintainers listed in the extra/recipe-maintainers section.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/htop) and found it was in an excellent condition.

@keuv-grvl keuv-grvl closed this Sep 15, 2016
@jakirkham
Copy link
Member

Seems like a nice recipe to have. What is the reason for closing? Please let us know if there is anything we can do.

Normally I use glances for this as it works everywhere including Windows. Though htop is still definitely a nice utility to have.

@keuv-grvl
Copy link
Contributor Author

Ow! Closing the PR was non intended.

Nonetheless, my local test (a simple conda build recipes/htop && conda install htop --use-local in an empty conda-env) do not work if conda get ncurses from conda-forge channel (5.9-9). But it works with the default channel (ncurses 5.9-8).
Any idea why?

@keuv-grvl keuv-grvl reopened this Sep 15, 2016
@jakirkham
Copy link
Member

Ok, cool. Just wanted to make sure you hadn't lost hope. 😄

Hmm...so ncurses build number 9 of 5.9 dropped the argument --with-terminfo-dirs. Please see PR ( conda-forge/ncurses-feedstock#19 ) for details. That had to be dropped as it caused issues ( conda-forge/ncurses-feedstock#17 ) for other users. We could try to bring it back with a list of directories to search.

Could you please provide info about your system? Guessing Linux of some kind?

@keuv-grvl
Copy link
Contributor Author

I use Ubuntu 16.04.1 x86_64 with conda 4.2.6.

I'm not familiar with ncurses, but maybe this and this could help.

@jakirkham
Copy link
Member

Yep, that seems right. Could you please submit a PR to the feedstock?


source:
git_url: https://github.com/hishamhm/htop.git
git_rev: {{ version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please switch this to a tarball instead?

  fn: {{ name }}-{{ version }}.tar.gz
  url: https://github.com/hishamhm/htop/archive/{{ version }}.tar.gz
  sha256: <some checksum>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

requirements:
build:
- automake
- gcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop gcc as we already include the compilers on the VMs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

skip: true # [win]

requirements:
build:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add toolchain to properly configure the VM compilers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- automake
- gcc
- libtool
- ncurses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pin to 5.9* to match our global pinnings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also shouldn't this be a run time dependency too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I'm not sure if I pinned it right...
  • Now added to run time dependency


about:
home: https://github.com/hishamhm/htop/
license: GNU General Public License, version 2 (GPL-2.0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please shorten to GPL-2 or similar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please include the license file by adding license_file: COPYING.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


extra:
recipe-maintainers:
- keuv-grvl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please add terminal newline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

build:
- automake
- gcc
- libtool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add pkg-config? Seems like we can't find the headers for ncurses. So this may help.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did not change anything on my system, so I did not add it. But let met know if I have to.

set -euo pipefail
./autogen.sh
./configure --prefix=$PREFIX
make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a make check that we can run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one, but it does not seem to check something. I added it anyway.

- automake
- gcc
- libtool
- ncurses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also shouldn't this be a run time dependency too?

@@ -0,0 +1,6 @@
#!/bin/bash
set -euo pipefail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the following to fix the include failure.

export CFLAGS="-I${PREFIX}/include ${CFLAGS}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jakirkham
Copy link
Member

jakirkham commented Sep 19, 2016

Given the changes mentioned above and your PR ( conda-forge/ncurses-feedstock#23 ), I was able to build htop and run it locally. So I think we are on the right path. 😄

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@keuv-grvl
Copy link
Contributor Author

keuv-grvl commented Sep 19, 2016

Thank your @jakirkham for your review!

I added your suggestions to the current PR, and it works on my machine using:

conda build recipes/htop
conda search htop --use-local
conda install htop --use-local

Let me know if you can reproduce it.
Also, I did not use conda-forge/ncurses-feedstock#23 but the current ncurses from conda-forge (5.9-9).

The odd thing is: I dropped conda-forge from my channels (using conda config --remove-key channels) to use only channel defaults, then tried to build the package, and it worked (I had to remove CFLAGS and toolchain). These packages were used as dependencies:

  • libgcc-5.2.0-0
  • libtool-2.4.2-0
  • m4-1.4.17-0
  • autoconf-2.69-0
  • ncurses-5.9-8

So I guess ncurses-5.9-9 from the conda-forge is "breaking" something, but I can't figure out how precisely...
Anyway, we are making some progress 😃

@@ -0,0 +1,355 @@
GNU GENERAL PUBLIC LICENSE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need this right? We are just grabbing it from the source code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So which license file should I add?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to add one.

The feedstock will get a BSD 3-Clause license as it is the standard.

Adding the license_file portion in the recipe was the only thing we needed to do. However, it pulls the license file from the htop's source. So it isn't using this file either.

- toolchain
- automake
- libtool
- ncurses >=5.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ncurses 5.9*. Otherwise this will break when ncurses 6.0 is released here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- ncurses >=5.9

run:
- ncurses >=5.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/htop) and found it was in an excellent condition.

@jakirkham
Copy link
Member

To build, we normally use a Docker container. This should be easy to do locally as long as you have Docker installed. To get the build artifacts out, you may need to use PR ( #1508 ). This will drop the package in build_artefacts/linux-64. Please try installing the package on your Linux machine with conda-forge enabled and let me know how that goes.

@jakirkham
Copy link
Member

So I built this fine in the Docker container and was able to use it successfully in our container and Continuum's. Not sure what is causing you build issues locally, but would recommend using our Docker container and seeing if the resulting package will work on your OS.

@keuv-grvl
Copy link
Contributor Author

I successfully built htop using the Docker container. I also could install and run htop within the Docker container.
Then I added the build_artefacts/ folder to my channels in the ~/.condarc file and I could install htop from this local channel.

Everything seems to work fine :)

So is conda-forge/ncurses-feedstock#23 still relevant?

@jakirkham
Copy link
Member

Great! Glad this works for you. 😄

We can take a closer look at the build issues you encountered outside the Docker image in an issue at the feedstock. Just make sure to ping me as I'm often unsubscribed from feedstocks to keep notifications manageable.

So is conda-forge/ncurses-feedstock#23 still relevant?

No, it sounds like it isn't. Would you mind closing it and making a note about this?

@jakirkham
Copy link
Member

jakirkham commented Sep 20, 2016

Could you please revert/remove commit ( c3ef0b8 ) from the PR?

Edit: Also please drop the license file.

@jakirkham jakirkham merged commit 1f3698b into conda-forge:master Sep 20, 2016
@jakirkham
Copy link
Member

Thanks @keuv-grvl.

@jakirkham
Copy link
Member

jakirkham commented Sep 20, 2016

Soon you should get an email that invite you to join conda-forge, @keuv-grvl. Once accepted you will be added to a team with the same name as this recipe. Those will give you permissions on the feedstock (repo) for this recipe.

Make sure when proposing any change that you go through the typical GitHub workflow of forking the feedstock and making changes in your fork that you PR back. Once merged CIs will build and deploy any changes you make.

Please let us know if you have any questions and welcome to conda-forge. 😄

@keuv-grvl
Copy link
Contributor Author

htop was my first recipe. So thank you @jakirkham for your precious help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants