Skip to content

Commit

Permalink
pants: init at 1.2.1
Browse files Browse the repository at this point in the history
This will need more patching to work properly (especially for python
builds), but I've been able to convince it to build some simple java and
scala projects in its current form so I figured I'd spread it.
  • Loading branch information
copumpkin committed Feb 7, 2017
1 parent bfd7fe8 commit 97bf063
Showing 1 changed file with 148 additions and 0 deletions.
148 changes: 148 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,17 @@ in {
};
};

ansicolors = buildPythonPackage rec {
name = "ansicolors-${version}";
version = "1.0.2";

src = self.fetchPypi {
pname = "ansicolors";
inherit version;
sha256 = "02lmh2fbqcwr98cq13l9ql0fvyad1dcb3ap3c5xq9qwjp45m6r3n";
};
};

asgiref = buildPythonPackage rec {
name = "asgiref-${version}";
version = "1.0.0";
Expand Down Expand Up @@ -8148,6 +8159,17 @@ in {
};
};

lmdb = buildPythonPackage rec {
pname = "lmdb";
version = "0.92";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "01nw6r08jkipx6v92kw49z34wmwikrpvc5j9xawdiyg1n2526wrx";
};
};

logilab_astng = buildPythonPackage rec {
name = "logilab-astng-0.24.3";

Expand Down Expand Up @@ -8478,6 +8500,33 @@ in {
};
};

pants = buildPythonPackage rec {
pname = "pantsbuild.pants";
version = "1.2.1";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "1bnzhhd2acwk7ckv56xzg2d9vxacl3k5bh13bsjxymnq3spm962w";
};

prePatch = ''
sed -E -i "s/'([[:alnum:].-]+)[=><][^']*'/'\\1'/g" setup.py
'';

# Unnecessary, and causes some really weird behavior around .class files, which
# this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520.
dontStrip = true;

propagatedBuildInputs = with self; [
ansicolors beautifulsoup4 cffi coverage docutils fasteners futures
isort lmdb markdown mock packaging pathspec pep8 pex psutil pyflakes
pygments pystache pytestcov pytest pywatchman requests2 scandir
setproctitle setuptools six thrift wheel twitter-common-dirutil
twitter-common-confluence twitter-common-collections
];
};

paperwork-backend = buildPythonPackage rec {
name = "paperwork-backend-${version}";
version = "1.0.6";
Expand Down Expand Up @@ -8513,6 +8562,17 @@ in {
};
};

pathspec = buildPythonPackage rec {
pname = "pathspec";
version = "0.3.4";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "0a37yrr2jhlg8aiynxivh2xqani7l9j725qxzrm7cm7m4rfcl1bn";
};
};

pathtools = buildPythonPackage rec {
name = "pathtools-${version}";
version = "0.1.2";
Expand Down Expand Up @@ -8651,6 +8711,20 @@ in {
};
};

pex = buildPythonPackage rec {
name = "pex-${version}";
version = "1.2.2";

src = self.fetchPypi {
pname = "pex";
sha256 = "1nwrf03cd6jw24lxyaalj59fdm2infr9glabznkpaq65mjzwshl3";
inherit version;
};

# A few more dependencies I don't want to handle right now...
doCheck = false;
};

pies = buildPythonPackage rec {
name = "pies-2.6.5";

Expand Down Expand Up @@ -25950,6 +26024,80 @@ in {
};
};

twitter-common-collections = buildPythonPackage rec {
pname = "twitter.common.collections";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "0wf8ks6y2kalx2inzayq0w4kh3kg25daik1ac7r6y79i03fslsc5";
};

propagatedBuildInputs = with self; [ twitter-common-lang ];
};

twitter-common-confluence = buildPythonPackage rec {
pname = "twitter.common.confluence";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "1i2fjn23cmms81f1fhvvkg6hgzqpw07dlqg3ydz6cqv2glw7zq26";
};

propagatedBuildInputs = with self; [ twitter-common-log ];
};

twitter-common-dirutil = buildPythonPackage rec {
pname = "twitter.common.dirutil";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "1wpjfmmxsdwnbx5dl13is4zkkpfcm94ksbzas9y2qhgswfa9jqha";
};

propagatedBuildInputs = with self; [ twitter-common-lang ];
};

twitter-common-lang = buildPythonPackage rec {
pname = "twitter.common.lang";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "1l8fmnsrx7hgg3ivslg588rnl9n1gfjn2w6224fr8rs7zmkd5lan";
};
};

twitter-common-log = buildPythonPackage rec {
pname = "twitter.common.log";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "1bdzbxx2bxwpf57xaxfz1nblzgfvhlidz8xqd7s84c62r3prh02v";
};

propagatedBuildInputs = with self; [ twitter-common-options twitter-common-dirutil ];
};

twitter-common-options = buildPythonPackage rec {
pname = "twitter.common.options";
version = "0.3.9";
name = "${pname}-${version}";

src = self.fetchPypi {
inherit pname version;
sha256 = "0d1czag5mcxg0vcnlklspl2dvdab9kmznsycj04d3vggi158ljrd";
};
};

twine = buildPythonPackage rec {
name = "twine-${version}";
version = "1.8.1";
Expand Down

20 comments on commit 97bf063

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

I very much feel like reverting this:

  • meta is missing everywhere
  • tests do not function (for the packages I tested)
  • one commit with a lot of packages instead of separate commits.

I can fully understand that someone doesn't have time to fix everything, we're all busy, but by not fixing the tests that load is shifted to someone else. Its very hard this way to tell whether a change (of a dependency) broke any of these packages.

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017 via email

Choose a reason for hiding this comment

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

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

What does the one-package-per-commit buy us
in this kind of situation?

More accessible history and the possibility to cherry-pick individual packages.

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017 via email

Choose a reason for hiding this comment

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

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017 via email

Choose a reason for hiding this comment

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

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

If one chooses to cherry-pick the main dependent, pants (?), then yes. However, if one wants to cherry-pick one of the dependencies, then that's not true.

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017 via email

Choose a reason for hiding this comment

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

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017 via email

Choose a reason for hiding this comment

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

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

Will you be annoyed if I add the meta tags in a single commit? 😄 I can break them up but it just feels like such busywork for questionable benefit...

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

Also, would it be weird to define a twitter-commons attrset inside pythonPackages rather than using all those hyphenated names?

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

@FRidh when you say tests don't pass, what do you mean? I just tried building it under build-use-sandbox and the whole thing built fine. Do you have a particular thing that breaks from this commit?

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

Build the Python 3 versions of these packages and observe.

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

@FRidh I still don't understand. It seems that by depending on fasteners (which I didn't add), I'm excluding python 3. Should I just disable it on python 3?

$ nix-build -A python3Packages.fasteners
error: testtools-1.8.0 not supported for interpreter python3.5m

Sorry, I'm trying not to be dense here. Just trying to understand what's wrong with the above. I admit that I didn't test it on python3Packages and should have, but if it doesn't work because of a transitive dependency, I'm not sure what I can/should do about that.

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

In the case that you're quoting there is nothing to be done. I meant packages like twitter-common-collections which doesn't find any tests (in the case of Python 3).

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

Oh!! I see, that makes sense. I'll fix those.

@copumpkin
Copy link
Member Author

@copumpkin copumpkin commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

I actually couldn't get twitter-common-collections (or any of the twitter-* packages) to fail on python 3 (.4, .5, or .6) or 2. I did find an issue with python 3 on lmdb and it wasn't clear what was going wrong so I just disabled checks on python3 for now. I'm now adding meta tags to the remaining packages. Anything I'm missing?

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

@FRidh any thoughts on my question about making twitter-common a nested attrset inside pythonPackages? Do other things assume we won't have nested attrsets?

@FRidh
Copy link
Member

@FRidh FRidh commented on 97bf063 Feb 8, 2017

Choose a reason for hiding this comment

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

@copumpkin yes, let's not do that. They're all just packages, and the names you've used are very similar to upstream names. Putting them in a set will complicate overriding the package set.

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough. My main motivation was to factor out the common meta elements across them (license, site, maintainer) and a nested attrset would've given me a nice "local" place to put a let commonMeta = { }; 😄

@copumpkin
Copy link
Member Author

Choose a reason for hiding this comment

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

@FRidh I think all the meta is dealt with now and they all seem to build fine on all python3* and python2. Thanks for all the help/feedback!

Please sign in to comment.