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

python-docx: init at 0.8.6 #38722

Merged
merged 1 commit into from Apr 15, 2018
Merged

python-docx: init at 0.8.6 #38722

merged 1 commit into from Apr 15, 2018

Conversation

AJChapman
Copy link
Contributor

@AJChapman AJChapman commented Apr 11, 2018

Motivation for this change

This library is a required dependency for something I need to build.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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.

buildPythonPackage rec {
pname = "python-docx";
version = "0.8.6";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

The name attribute is added by buildPython* and should therefore be removed.

@FRidh
Copy link
Member

FRidh commented Apr 11, 2018

@GrahamcOfBorg build python3.pkgs.python-docx

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: python3.pkgs.python-docx

Partial log (click to expand)

Reading https://pypi.python.org/simple/pytest/
Download error on https://pypi.python.org/simple/pytest/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytest' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
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 pytest
error: Could not find suitable distribution for Requirement.parse('pytest')
builder for '/nix/store/dimjbvxwszqizm73l14wprfhcg6akls6-python3.6-python-docx-0.8.6.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/dimjbvxwszqizm73l14wprfhcg6akls6-python3.6-python-docx-0.8.6.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python3.pkgs.python-docx

Partial log (click to expand)

Reading https://pypi.python.org/simple/pytest/
Download error on https://pypi.python.org/simple/pytest/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytest' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
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 pytest
error: Could not find suitable distribution for Requirement.parse('pytest')
builder for '/nix/store/dwp9vg65yjwsxw4qsr2kdgg8hqac5rq3-python3.6-python-docx-0.8.6.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/dwp9vg65yjwsxw4qsr2kdgg8hqac5rq3-python3.6-python-docx-0.8.6.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python3.pkgs.python-docx

Partial log (click to expand)

reading manifest file 'python_docx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_docx.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/4vbr4mknj177smwa1zp4frs54syj62fv-python3.6-python-docx-0.8.6

@FRidh
Copy link
Member

FRidh commented Apr 11, 2018

Test dependencies are missing. I suggest testing with the sandbox turned on.

@AJChapman
Copy link
Contributor Author

I may have fixed these, not sure if my nix.useSandbox = true is working...

@AJChapman
Copy link
Contributor Author

@GrahamcOfBorg build python3.pkgs.python-docx

@AJChapman
Copy link
Contributor Author

Ok @FRidh, I think I have it working now.

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.

Please squash the commits and use

pythonPackages.python-docx: init at 0.8.6

as the commit message.

sha256 = "117i84s6fcdsrfckbvznnqgqwhnf1x0523ps16cki8sg9byydv2m";
};

buildInputs = [ behave lxml pytest pyparsing mock ];
Copy link
Member

Choose a reason for hiding this comment

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

lxml belongs into propagatedBuildInputs, the rest into checkInputs


meta = {
description = "Create and update Microsoft Word .docx files";
homepage = "https://python-docx.readthedocs.io/en/latest/";
Copy link
Member

Choose a reason for hiding this comment

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

no quotes

@dotlambda
Copy link
Member

@GrahamcOfBorg build python3.pkgs.python-docx

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python3.pkgs.python-docx

Partial log (click to expand)

reading manifest file 'python_docx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_docx.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK
/nix/store/yb8p86g2j1qhh5r80a1fmkhpfh2vgki5-python3.6-python-docx-0.8.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3.pkgs.python-docx

Partial log (click to expand)

reading manifest file 'python_docx.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_docx.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/hv5qp66hvnh0k9nwzxny6siiwanznc81-python3.6-python-docx-0.8.6

@dotlambda
Copy link
Member

Ran 0 tests in 0.000s

Please specify an appropriate checkPhase, e.g.

checkPhase = ''
  py.test
'';

@AJChapman
Copy link
Contributor Author

checkPhase added, dependencies updated, commits squashed, and commit message updated. Thanks for the thorough review!

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.python-docx python3.pkgs.python-docx

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.python-docx, python3.pkgs.python-docx

Partial log (click to expand)


=============================== warnings summary ===============================
tests/styles/test_styles.py::DescribeStyles::()::it_can_get_a_style_by_id[getitem_id_fixture0]
  /build/python-docx-0.8.6/docx/styles/styles.py:54: UserWarning: style lookup by style_id is deprecated. Use style name as key instead.
    warn(msg, UserWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
=================== 1354 passed, 1 warnings in 5.45 seconds ====================
/nix/store/k2prjffaa6kggi2sskgncy1l059pwi9x-python2.7-python-docx-0.8.6
/nix/store/dnqkqpmz84zws4ysb1fw7ja86lspbdj9-python3.6-python-docx-0.8.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.python-docx, python3.pkgs.python-docx

Partial log (click to expand)


=============================== warnings summary ===============================
tests/styles/test_styles.py::DescribeStyles::()::it_can_get_a_style_by_id[getitem_id_fixture0]
  /build/python-docx-0.8.6/docx/styles/styles.py:54: UserWarning: style lookup by style_id is deprecated. Use style name as key instead.
    warn(msg, UserWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
=================== 1354 passed, 1 warnings in 38.85 seconds ===================
/nix/store/aiphsx26j5xzg5r4v83xld7np6qpj65k-python2.7-python-docx-0.8.6
/nix/store/i3nr5wlvyzzbpq7i7fz53wn24fjpxxbg-python3.6-python-docx-0.8.6

@dotlambda dotlambda merged commit 35f75cf into NixOS:master Apr 15, 2018
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

4 participants