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

python3Packages.rich: init at 8.0.0 #100273

Closed
wants to merge 3 commits into from
Closed

Conversation

@sengaya
Copy link
Contributor

@sengaya sengaya commented Oct 11, 2020

Motivation for this change

Dependency for latest version of ansible-lint

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I could run the unit tests when using fetchFromGitHub instead of fetchPypi but then pythonImportsCheck failed. I sticked to fetchPypi for now and disabled the unit tests.


propagatedBuildInputs = [ typing-extensions pygments recommonmark colorama ];

doCheck = false;
Copy link
Member

@mweinelt mweinelt Oct 12, 2020

If the pypi package does not contain the tests please switch to the GitHub sources.

Copy link
Contributor Author

@sengaya sengaya Oct 12, 2020

Switched to GitHub sources. I had to patch setup.py though, see 9651c26.

buildPythonPackage rec {
pname = "rich";
version = "8.0.0";
disabled = isPy27;
Copy link
Member

@mweinelt mweinelt Oct 12, 2020

The difference is probably minimal, but pythonOlder "3.6" is probably more accurate? https://github.com/willmcgugan/rich/blob/master/pyproject.toml#L26

- Use fetchFromGitHub, needed for enabling tests
- Use pythonOlder to match exact requirement of the package
};

postPatch = ''
sed -i 's/setuptools.setup(name="rich")/setuptools.setup(name="rich", packages=setuptools.find_packages())/g' setup.py
Copy link
Member

@mweinelt mweinelt Oct 12, 2020

indent is one space off


propagatedBuildInputs = [ typing-extensions pygments recommonmark colorama ];

checkInputs = [ pytest pytestcov ];
Copy link
Member

@mweinelt mweinelt Oct 12, 2020

We generally don't require coverage tests, since they are of no use to us. If you can skip them easily that would be appreciated.

Copy link
Contributor

@jonringer jonringer Oct 12, 2020

seeing as the test suite is invoked through "make test", it may be required there.

However, it would probably be best to look at the command that make test is running, and just run it without coverage plugins.

Copy link
Contributor Author

@sengaya sengaya Oct 12, 2020

Thanks for the feedback. This is the command called: pytest --cov-report term-missing --cov=rich tests/ -vv. I guess the -vv can be omitted as well? I'll update the PR.

@sengaya
Copy link
Contributor Author

@sengaya sengaya commented Oct 12, 2020

I guess that was bad timing and we can close this PR: 5b66067

@sengaya sengaya closed this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants