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

gitAndTools.git-filter-repo: init at 2.24.0 #77418

Merged
merged 1 commit into from Feb 16, 2020

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Jan 10, 2020

Motivation for this change

Add https://github.com/newren/git-filter-repo

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.
Notify maintainers

cc @

@@ -40,6 +40,10 @@ let

git-fame = callPackage ./git-fame {};

git-filter-repo = callPackage ./git-filter-repo {
inherit (python3Packages) buildPythonApplication fetchPypi;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
inherit (python3Packages) buildPythonApplication fetchPypi;
inherit (python3Packages) buildPythonApplication fetchPypi setuptools_scm;

Copy link
Contributor

Choose a reason for hiding this comment

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

to avoid

$ nix-build ./nixpkgs/ -A gitAndTools.git-filter-repo
these derivations will be built:
  /nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv
building '/nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv'...
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
unpacking sources
unpacking source archive /nix/store/fy14pm0cjr3qdbc84kc6ykxwcq6qi6f4-git-filter-repo-2.24.0.tar.gz
source root is git-filter-repo-2.24.0
setting SOURCE_DATE_EPOCH to timestamp 1577393070 of file git-filter-repo-2.24.0/setup.cfg
patching sources
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
WARNING: The directory '/homeless-shelter/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff7079790>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0090>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd02d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0490>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ffff5cd0550>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools-scm/
ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
ERROR: No matching distribution found for setuptools_scm
Traceback (most recent call last):
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpe9jr51r_', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 5, in <module>
    setup(use_scm_version=dict(root="..", relative_to=__file__))
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
    replace_conflicting=True,
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/nix/store/p1dmakxx9x71m3zwhh2w0908hhg8jj7v-python3.7-setuptools-42.0.2/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
    raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/nix/store/bzvpdbzdy3a1qba8f9ynrzyz811c10pp-python3-3.7.6/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpe9jr51r_', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
builder for '/nix/store/ppvxnwxx0i8qwcgym4g8vsw1bpak2xzy-git-filter-repo-2.24.0.drv' failed with exit code 1

inherit pname version;
sha256 = "f366501b64506b0a05a8d134fe19ca0f41bb62a2dbe16f9c93c9bfb3610ec44e";
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
nativeBuildInputs = [ setuptools_scm ];

@@ -0,0 +1,22 @@
{ stdenv, fetchPypi, buildPythonApplication }:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ stdenv, fetchPypi, buildPythonApplication }:
{ stdenv, fetchPypi, buildPythonApplication, setuptools_scm }:

@marsam marsam force-pushed the init-gitAndTools.git-filter-repo branch from 4e76cba to d9b960f Compare January 14, 2020 01:12
@marsam
Copy link
Contributor Author

marsam commented Jan 14, 2020

@jonringer thanks for reviewing; since packaging it as python package is a bit cumbersome, I opted to use wrapPython

@jonringer
Copy link
Contributor

oh, if you did my changes it would have been fine. I was able to build and run it just fine. I would say now it's a non-standard python package :(

@marsam marsam force-pushed the init-gitAndTools.git-filter-repo branch from d9b960f to bc6c029 Compare January 19, 2020 00:35
@marsam marsam merged commit a05d11a into NixOS:master Feb 16, 2020
@marsam marsam deleted the init-gitAndTools.git-filter-repo branch February 16, 2020 23:26
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

2 participants