Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679014 - dev-python/pre-commit - A framework for managing and maintaining multi-language pre-commit hooks
Summary: dev-python/pre-commit - A framework for managing and maintaining multi-langua...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/pre-commit/pre-commit
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: 530742
  Show dependency tree
 
Reported: 2019-02-27 23:28 UTC by A Schenck
Modified: 2021-04-16 15:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pre_commit-1.14.4.ebuild (pre_commit-1.14.4.ebuild,992 bytes, text/plain)
2019-02-27 23:28 UTC, A Schenck
Details
dependency dev-python/nodeenv-1.1.3 (nodeenv-1.3.3.ebuild,450 bytes, text/plain)
2019-02-27 23:29 UTC, A Schenck
Details
dependency dev-python/importlib_metadata-0.6 (importlib_metadata-0.6.ebuild,578 bytes, text/plain)
2019-02-27 23:30 UTC, A Schenck
Details
dependency dev-python/identify-1.1.7 (identify-1.1.7.ebuild,452 bytes, text/plain)
2019-02-27 23:30 UTC, A Schenck
Details
dependency dev-python/aspy-yaml-1.1.1 (aspy-yaml-1.1.1.ebuild,521 bytes, text/plain)
2019-02-27 23:30 UTC, A Schenck
Details
dependency dev-python/cfgv-1.4.0 (cfgv-1.4.0.ebuild,505 bytes, text/plain)
2019-02-27 23:31 UTC, A Schenck
Details
dependency dev-python/importlib_resources-1.0.2 (importlib_resources-1.0.2.ebuild,580 bytes, text/plain)
2019-02-27 23:32 UTC, A Schenck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description A Schenck 2019-02-27 23:28:47 UTC
Created attachment 566854 [details]
pre_commit-1.14.4.ebuild

My company uses 'pre-commit' https://pre-commit.com/ as a lint step before committing code.  I prefer having system packages rather than running from the venv so I packaged it and several dependencies.  Deps and PYTHON_TARGETS are according to the packages' setup.py, but I added Py 3.7 to a few because it works.  One weird thing was 'aspy.yaml' because it has a dot in the name, portage warns that it's a 'namespace package' or some such.  There might be a better way to deal with this but I couldn't find it.
Comment 1 A Schenck 2019-02-27 23:29:29 UTC
Created attachment 566856 [details]
dependency dev-python/nodeenv-1.1.3
Comment 2 A Schenck 2019-02-27 23:30:00 UTC
Created attachment 566858 [details]
dependency dev-python/importlib_metadata-0.6
Comment 3 A Schenck 2019-02-27 23:30:22 UTC
Created attachment 566860 [details]
dependency dev-python/identify-1.1.7
Comment 4 A Schenck 2019-02-27 23:30:53 UTC
Created attachment 566862 [details]
dependency dev-python/aspy-yaml-1.1.1
Comment 5 A Schenck 2019-02-27 23:31:17 UTC
Created attachment 566864 [details]
dependency dev-python/cfgv-1.4.0
Comment 6 A Schenck 2019-02-27 23:32:20 UTC
Created attachment 566866 [details]
dependency dev-python/importlib_resources-1.0.2
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2019-02-28 06:56:13 UTC
Comment on attachment 566854 [details]
pre_commit-1.14.4.ebuild

># Copyright 1999-2019 Gentoo Authors
># Distributed under the terms of the GNU General Public License v2
>
>EAPI=6
>
>PYTHON_COMPAT=( python{2_7,3_6,3_7} pypy )
>
>inherit distutils-r1
>
>DESCRIPTION="A framework for managing and maintaining multi-language pre-commit"

Pre-commit *hooks*, right?
Comment 8 A Schenck 2019-03-01 20:55:02 UTC
(In reply to Jeroen Roovers from comment #7)
> Comment on attachment 566854 [details]
> pre_commit-1.14.4.ebuild
> 
> ># Copyright 1999-2019 Gentoo Authors
> ># Distributed under the terms of the GNU General Public License v2
> >
> >EAPI=6
> >
> >PYTHON_COMPAT=( python{2_7,3_6,3_7} pypy )
> >
> >inherit distutils-r1
> >
> >DESCRIPTION="A framework for managing and maintaining multi-language pre-commit"
> 
> Pre-commit *hooks*, right?

This is the pre-commit program itself, which runs whichever hooks you configure.
Comment 9 A Schenck 2019-04-03 18:12:59 UTC
A better version of importlib_resources has been added by a proxy maintainer in 9c37fa91155a0ed35c901e627fc87038386ca874 so that part of this ticket can be ignored.
Comment 10 A Schenck 2019-04-03 18:16:04 UTC
Patrice,

You added one of the dependencies of this (importlib_resources) recently.  Would you mind looking at the rest of pre-commit and it's dependencies?

Thanks,
-A
Comment 11 Larry the Git Cow gentoo-dev 2019-04-06 22:23:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4a7a6aa8dfbf89e891979eb3bcabbd78080199c

commit f4a7a6aa8dfbf89e891979eb3bcabbd78080199c
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2019-04-04 09:58:10 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2019-04-06 22:22:19 +0000

    dev-python/nodeenv: new package.
    
    Virtual environment for Node.js & integrator with virtualenv.
    
    Bug: https://bugs.gentoo.org/679014
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
    Package-Manager: Portage-2.3.62, Repoman-2.3.11

 dev-python/nodeenv/Manifest             |  1 +
 dev-python/nodeenv/metadata.xml         | 11 +++++++++++
 dev-python/nodeenv/nodeenv-1.1.3.ebuild | 20 ++++++++++++++++++++
 3 files changed, 32 insertions(+)
Comment 12 Larry the Git Cow gentoo-dev 2021-04-16 15:35:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfc5aaf1ec3029a7aeb0401b5180619a6201e782

commit cfc5aaf1ec3029a7aeb0401b5180619a6201e782
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-04-16 15:25:14 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-04-16 15:35:15 +0000

    dev-vcs/pre-commit: new package
    
    With tests regrettably restricted for now - although their vast majority
    (excluding the language/repository ones, which have a lot of
    dependencies and do not always handle their absence correctly) passes,
    there are 9 which fail due to unspecified problems invoking git.
    
    Closes: https://bugs.gentoo.org/679014
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 dev-vcs/pre-commit/Manifest                 |  1 +
 dev-vcs/pre-commit/metadata.xml             | 12 ++++++
 dev-vcs/pre-commit/pre-commit-2.12.0.ebuild | 67 +++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)