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

pythonPackages.coconut init at 1.4.0 #54952

Closed
wants to merge 3 commits into from

Conversation

bbarker
Copy link
Contributor

@bbarker bbarker commented Jan 30, 2019

Motivation for this change

Adding the coconut extension language for python.

Currently not surewhy this version check error occurs, as nix-shell seems to pull in the only version of pyparsing that might be satisfied (2.2.0):

adding 'coconut-1.4.0.dist-info/top_level.txt'
adding 'coconut-1.4.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
installing
/tmp/nix-build-python3.6-coconut-1.4.0.drv-0/coconut-1.4.0/dist /tmp/nix-build-python3.6-coconut-1.4.0.drv-0/coconut-1.4.0
Processing ./coconut-1.4.0-py2.py3-none-any.whl
Requirement already satisfied: prompt-toolkit>=1; python_version >= "2.7" in /nix/store/dvrxlf62vllil9p1zyx5a5lj552fsjsc-python3.6-prompt-toolkit-2.0.8/lib/python3.6/site-packages (from coconut==1.4.0) (2.0.8)
Requirement already satisfied: pygments>=2.2; python_version >= "2.7" in /nix/store/87cxgia0p8xywxvfyn0x76gcra1hwbin-python3.6-Pygments-2.2.0/lib/python3.6/site-packages (from coconut==1.4.0) (2.2.0)
Collecting pyparsing<2.2.1,>=2.2.0 (from coconut==1.4.0)
  Could not find a version that satisfies the requirement pyparsing<2.2.1,>=2.2.0 (from coconut==1.4.0) (from versions: )
No matching distribution found for pyparsing<2.2.1,>=2.2.0 (from coconut==1.4.0)
builder for '/nix/store/rjbwkkws2928jc6hsh1xyidygnmgqk9d-python3.6-coconut-1.4.0.drv' failed with exit code 1
error: build of '/nix/store/rjbwkkws2928jc6hsh1xyidygnmgqk9d-python3.6-coconut-1.4.0.drv' failed
brandon@beb82dell0-DevContainer:~/workspace/nixpkgs
$ nix-shell -p python36Packages.pyparsing
these paths will be fetched (0.08 MiB download, 0.42 MiB unpacked):
  /nix/store/ify31q1k4784f6jv5d8mrbdy322ijffj-python3.6-pyparsing-2.2.0
copying path '/nix/store/ify31q1k4784f6jv5d8mrbdy322ijffj-python3.6-pyparsing-2.2.0' from 'https://cache.nixos.org'...

[nix-shell:~/workspace/nixpkgs]$ exit

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@bbarker
Copy link
Contributor Author

bbarker commented Jan 30, 2019

I'll note that when using pypi2nix coconut was able to run without issue.

@@ -1259,6 +1261,9 @@ in {

pretend = callPackage ../development/python-modules/pretend { };

prompt-toolkit = callPackage ../development/python-modules/prompt-toolkit {};
Copy link
Member

Choose a reason for hiding this comment

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

Already exists as prompt_toolkit.


meta = with stdenv.lib; {
homepage = "http://coconut-lang.org";
license = "Apache-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.

Suggested change
license = "Apache-2.0";
license = licenses.asl20;

meta = with stdenv.lib; {
homepage = "http://coconut-lang.org";
license = "Apache-2.0";
description = "Simple, elegant, Pythonic functional programming.";
Copy link
Member

Choose a reason for hiding this comment

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

homepage = "http://coconut-lang.org";
license = "Apache-2.0";
description = "Simple, elegant, Pythonic functional programming.";
maintainers = with lib.maintainers; [ bbarker ];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
maintainers = with lib.maintainers; [ bbarker ];
maintainers = with maintainers; [ bbarker ];

description = "Simple, elegant, Pythonic functional programming.";
maintainers = with lib.maintainers; [ bbarker ];
};
}
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 a \n

pyparsing
];

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

pname = "coconut";
version = "1.4.0";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

, pyparsing
}:

buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this an application rather than a library?

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 think it is both (two different ways to call it - as a python import or the command line).

Copy link
Member

Choose a reason for hiding this comment

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

Alright. Then it can stay that way.

sha256 = "b192c71022702b60b4c8c8dac06321a4a82e21c237ba2bb71d2edebb7540b8a9";
};

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

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

Why?

@@ -0,0 +1,32 @@
{ stdenv
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{ stdenv
{ lib

@dotlambda
Copy link
Member

pyparsing has been updated to 2.3.0 on master

@bbarker
Copy link
Contributor Author

bbarker commented Jan 30, 2019

@dotlambda Ah right. In this case, what is the recommended course of action - attempt a patch to see if it will work on 2.3.0?

@dotlambda
Copy link
Member

attempt a patch to see if it will work on 2.3.0?

Making an upstream PR and use that with fetchpatch is probably the most sensible thing to do.

@dotlambda dotlambda changed the title WIP: coconut init at 1.4.0; prompt-toolkit init at 2.0.8 pythonPackages.coconut init at 1.4.0 Jan 30, 2019
Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

The commits should be squashed and the resulting commit's message should equal this PR's title.

@mmahut
Copy link
Member

mmahut commented Aug 18, 2019

Are there any updates on this pull request, please?

@FRidh
Copy link
Member

FRidh commented Feb 9, 2020

Nothing happening so closing.

@FRidh FRidh closed this Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants