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

b2sdk: Add b2sdk python module. #78116

Closed
wants to merge 1 commit into from
Closed

b2sdk: Add b2sdk python module. #78116

wants to merge 1 commit into from

Conversation

sdier
Copy link
Contributor

@sdier sdier commented Jan 20, 2020

Motivation for this change

The B2 cli and duplicity applications should be depending on this instead of the current situation where B2 is exporting something like this.

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.

@sdier sdier mentioned this pull request Jan 20, 2020
10 tasks
@sdier
Copy link
Contributor Author

sdier commented Jan 20, 2020

Will rebase when #78124 is in.

@jonringer
Copy link
Contributor

#78124 was merged, please rebase

@sdier
Copy link
Contributor Author

sdier commented Jan 22, 2020

Ok has been rebased.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

please add tests, checkout from github if you have to. These are important when bumping dependencies.

Also, your commit message should be:

pythonPackages.b2sdk: init at 1.0.2

to conform to contributing guidelines

'';

checkInputs = [ mock pyflakes yapf nose ];
propagatedBuildInputs = [ arrow logfury requests setuptools six tqdm yapf ];
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
propagatedBuildInputs = [ arrow logfury requests setuptools six tqdm yapf ];
propagatedBuildInputs = [ arrow logfury requests setuptools six tqdm yapf ]
++ lib.optionals isPy27 [ futures ];
warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user
builder for '/nix/store/rich7lsi69jzm0nw84fnza1sr3dnizhb-python2.7-b2sdk-1.0.2.drv' failed with exit code 1; last 10 log lines:
  Executing pipInstallPhase
  /build/b2sdk-1.0.2/dist /build/b2sdk-1.0.2
  DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
  Processing ./b2sdk-1.0.2-py2-none-any.whl
  Requirement already satisfied: requests>=2.9.1 in /nix/store/rrxs8mkw2x96ia6jx2vakd3lrkb59fsz-python2.7-requests-2.22.0/lib/python2.7/site-packages (from b2sdk==1.0.2) (2.22.0)
  Requirement already satisfied: logfury>=0.1.2 in /nix/store/agq9y4w54cwnijylsp51ql64k5qr5jhs-python2.7-logfury-0.1.2/lib/python2.7/site-packages (from b2sdk==1.0.2) (0.1.2)
  Requirement already satisfied: tqdm>=4.5.0 in /nix/store/5ivwbb6zajiq63jdhm9spks5lkvjivkg-python2.7-tqdm-4.40.2/lib/python2.7/site-packages (from b2sdk==1.0.2) (4.40.2)
  Requirement already satisfied: setuptools in /nix/store/pfibnhl0w46pa2kyn47fdr5h8s466xh6-python2.7-setuptools-44.0.0/lib/python2.7/site-packages (from b2sdk==1.0.2) (44.0.0.post20200106)
  ERROR: Could not find a version that satisfies the requirement futures>=3.0.5; python_version < "3.2" (from b2sdk==1.0.2) (from versions: none)
  ERROR: No matching distribution found for futures>=3.0.5; python_version < "3.2" (from b2sdk==1.0.2)
cannot build derivation '/nix/store/dl7yczsczhrmhvw1s86c9gmyh308b3id-env.drv': 1 dependencies couldn't be built

@@ -466,6 +466,8 @@ in {

azure-multiapi-storage = callPackage ../development/python-modules/azure-multiapi-storage { };

b2sdk = callPackage ../development/python-modules/b2sdk {};
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
b2sdk = callPackage ../development/python-modules/b2sdk {};
b2sdk = callPackage ../development/python-modules/b2sdk {};

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there are tabs all over. I recommend using something like https://github.com/nix-community/nixpkgs-fmt.

@sdier
Copy link
Contributor Author

sdier commented Aug 21, 2020

I haven't had any time to look at this again and I've since stopped personally using B2. #95714 is in progress that is very similar and I can help review it.

@sdier sdier closed this Aug 21, 2020
@jonringer
Copy link
Contributor

sounds good

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