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.jira: fix build #41419

Merged
merged 1 commit into from Jun 3, 2018
Merged

pythonPackages.jira: fix build #41419

merged 1 commit into from Jun 3, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jun 3, 2018

Motivation for this change

The build for pythonPackages.jira failed with the following error:

Download error on https://pypi.python.org/simple/sphinx/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'sphinx' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for sphinx>=1.6.5
Traceback (most recent call last):
  ...
  File "/nix/store/bp4dillg6xxblpf00v8d9nxfx3bnggfy-python3.6-bootstrapped-pip-10.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('sphinx>=1.6.5')
builder for '/nix/store/8dv7mpspyk6kxwnzqb43rzm4q5j14xp0-python3.6-jira-1.0.15.drv' failed with exit code 1

The root issue is most likely caused by some docs fixes upstream
(pycontribs/jira@519183d)
which were released in 1.0.15. The bump (without the fix) has been
performed in 7a6bf66.

See https://hydra.nixos.org/build/75004048 for further reference

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/)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build python36Packages.jira

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

Successfully installed jira-1.0.15
/build/jira-1.0.15
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15
strip is /nix/store/21ymadblbmsbb2bk4q7gl4kjasp8zmgd-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15/lib  /nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15
checking for references to /build in /nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15...
wrapping `/nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/54j40jrvc5jyb1wxxalyqrm5jhdygvbk-python3.6-jira-1.0.15

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

Successfully installed jira-1.0.15
/build/jira-1.0.15
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15/lib  /nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15
checking for references to /build in /nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15...
wrapping `/nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/0ydczlmw1khl5gvb7094lifcjqw4n416-python3.6-jira-1.0.15

@@ -12,7 +14,7 @@ buildPythonPackage rec {
};

buildInputs = [ glibcLocales pytest pytestcov pytestrunner pbr ];
propagatedBuildInputs = [ requests requests_oauthlib requests_toolbelt defusedxml ];
propagatedBuildInputs = [ requests requests_oauthlib requests_toolbelt defusedxml sphinx pbr ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Are sphinx and pbr really needed at runtime? If they're used only for building, why propagate them?

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

  The script jirashell is installed in '/nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed jira-1.0.15
/private/tmp/nix-build-python3.6-jira-1.0.15.drv-0/jira-1.0.15
post-installation fixup
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15/lib  /nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15
wrapping `/nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/6s1ygvbhhckcvg95lfik7w4928ncck5k-python3.6-jira-1.0.15

@Ma27
Copy link
Member Author

Ma27 commented Jun 3, 2018

@xeji without pbr I get the following error when running the executable:

→ ./result/bin/jirashell
Traceback (most recent call last):
  File "/nix/store/7avd8qcqkrzcvjd62c15pwxmiwb1iyn5-python3.6-jira-1.0.15/bin/.jirashell-wrapped", line 8, in <module>
    from jira.jirashell import main
  File "/nix/store/7avd8qcqkrzcvjd62c15pwxmiwb1iyn5-python3.6-jira-1.0.15/lib/python3.6/site-packages/jira/__init__.py", line 4, in <module>
    from pbr.version import VersionInfo
ModuleNotFoundError: No module named 'pbr'

Regarding sphinx: I guess we can remove this.
I'm currently investigating (and tend to switch to a git-based build to run the test suite as well if possible)

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

Thanks.

I'm currently investigating (and tend to switch to a git-based build to run the test suite as well if possible)

Good idea.

@Ma27
Copy link
Member Author

Ma27 commented Jun 3, 2018

@xeji you were right, it's indeed possible to drop sphinx from the runtime dependency list what needed a minor patch in setup.py.
Unforunately I couldn't activate the test sutie, it heavily relies on connections to foreign JIRA servers which would be severly impure, therefore I'd tend to avoid the test suite for now :)

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

Thanks, sounds good.

@@ -1,29 +1,35 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k
, pytest, pytestrunner, pbr, glibcLocales , pytestcov
, requests, requests_oauthlib, requests_toolbelt, defusedxml }:
, requests, requests_oauthlib, requests_toolbelt, defusedxml
, flaky, ipython
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see where flaky is used below.

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh dammit, this was part of the attempt to get the test suite running 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

... it's a lot easier to find this stuff in other people's code than in your own 😄

The build for `pythonPackages.jira` failed with the following error:

```
Download error on https://pypi.python.org/simple/sphinx/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'sphinx' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for sphinx>=1.6.5
Traceback (most recent call last):
  ...
  File "/nix/store/bp4dillg6xxblpf00v8d9nxfx3bnggfy-python3.6-bootstrapped-pip-10.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('sphinx>=1.6.5')
builder for '/nix/store/8dv7mpspyk6kxwnzqb43rzm4q5j14xp0-python3.6-jira-1.0.15.drv' failed with exit code 1
```

The root issue is most likely caused by some docs fixes upstream
(pycontribs/jira@519183d)
which were released in 1.0.15. The bump (without the fix) has been
performed in 7a6bf66. Since `sphinx`
isn't needed during runtime, it's not necessary to use it as
`propagatedBuildInput`. In order to work around this the dependency had
to be removed from from `setup.py`.

See https://hydra.nixos.org/build/75004048 for further reference
@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build python36Packages.jira

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

Successfully installed jira-1.0.15
/build/jira-1.0.15
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15
strip is /nix/store/21ymadblbmsbb2bk4q7gl4kjasp8zmgd-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15/lib  /nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15
checking for references to /build in /nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15...
wrapping `/nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/c0xrfkcv0dwcc3bspm1xij1bk03vy4sz-python3.6-jira-1.0.15

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

  The script jirashell is installed in '/nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed jira-1.0.15
/private/tmp/nix-build-python3.6-jira-1.0.15.drv-0/jira-1.0.15
post-installation fixup
strip is /nix/store/yyak5sjv68n9vdgnkd2cb5djk1l9sqj5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15/lib  /nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15
wrapping `/nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/f31zdfjs24irlmmfq7fs7419c052sdf3-python3.6-jira-1.0.15

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python36Packages.jira

Partial log (click to expand)

Successfully installed jira-1.0.15
/build/jira-1.0.15
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15/lib  /nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15/bin
patching script interpreter paths in /nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15
checking for references to /build in /nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15...
wrapping `/nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15/bin/jirashell'...
/nix/store/pn62bfsap3791mvgz7pq63hlf8gjdgin-python3.6-jira-1.0.15

@xeji xeji merged commit a47d34c into NixOS:master Jun 3, 2018
@Ma27 Ma27 deleted the fix-python-jira branch June 3, 2018 20:12
@Ma27
Copy link
Member Author

Ma27 commented Jun 3, 2018

thx for your support! :)

orivej added a commit that referenced this pull request Jun 4, 2018
* master: (26 commits)
  python.pkgs.cairocffi: update tests for Cairo 1.15.12
  python.pkgs.cairocffi: 0.8.0 -> 0.8.1
  freecell-solver: fix build
  perlPackages.CPANPLUS: restore build inputs removed in #41394
  Fix GHCJS 8.4/8.2 in sandboxed builds (#41411)
  dockerTools.pullImage: expose image* attributes (#41366)
  rust: disable tests on darwin
  python.pkgs.detox: 0.11 -> 0.12
  certbot: disable check on darwin
  freeimage: fix build with glibc 2.27
  shadowsocks-libev: supports darwin (#41421)
  pythonPackages.jira: fix build (#41419)
  SDL: propagate libiconv
  schema2ldif: Init at 1.3
  nixos/exim: Add unit restart trigger (#41418)
  Add myself as maintainer for dnsdist
  Add myself as maintainer
  synapse-bt: init at 2018-06-04 (#41402)
  skim: 0.3.2 -> 0.4.0 (#41417)
  ctags: fix source url (#41382)
  ...
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

3 participants