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

pythonPackages.incapsula-cracker-py3: init at 0.1.8.1 #117412

Closed
wants to merge 4 commits into from
Closed

pythonPackages.incapsula-cracker-py3: init at 0.1.8.1 #117412

wants to merge 4 commits into from

Conversation

seghers
Copy link

@seghers seghers commented Mar 23, 2021

Motivation for this change

I'd like to use this library in Python scripts.

@freezeboy Thank you.
https://discourse.nixos.org/t/buildpythonpackage-no-matching-distribution-found-for-requests-from-incapsula-cracker-py3-0-1-8-1/10152/6

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.

And in configuration.nix add

environment = {
  systemPackages = with pkgs; [
    (let
       in python3.withPackages (ps: [
          ps.argcomplete
          ps.beautifulsoup4
          ps.dateutil
          ps.incapsula-cracker-py3
        ])
    )
  ];
}; #environment

sudo nixos-rebuild test -I nixpkgs=/home/forked_repositories/nixpkgs --fast

Successful

sudo nixos-rebuild switch -I nixpkgs=/home/forked_repositories/nixpkgs

Successful

My python script using this package runs without errors.

@fabaff
Copy link
Member

fabaff commented Mar 23, 2021

Related to #81418

--replace "bs4" "beautifulsoup4"
'';

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

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

The upstream repo contains tests. Consider to switch to the source provided by GitHub to run the tests.

Add pythonImportsCheck = [ "incapsula" ]; as additional safe-guard.

meta = with lib; {
description = "Bypass sites guarded with Incapsula";
homepage = "https://github.com/ziplokk1/incapsula-cracker-py3";
license = licenses.unlicense;
Copy link
Member

Choose a reason for hiding this comment

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

Consider to add yourself as maintainer.

Copy link
Member

Choose a reason for hiding this comment

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

It is required for new packages actually.

Copy link
Member

Choose a reason for hiding this comment

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

@r-rmcgibbo
Copy link

r-rmcgibbo commented Mar 23, 2021

Result of nixpkgs-review pr 117412 at f718565 run on aarch64-linux 1

2 packages built successfully:
  • python38Packages.incapsula-cracker-py3
  • python39Packages.incapsula-cracker-py3
2 suggestions:
  • warning: maintainers-missing

    Package does not have a maintainer. Consider adding yourself?

    Near pkgs/development/python-modules/incapsula-cracker-py3/default.nix:21:3:

       |
    21 |   meta = with lib; {
       |   ^
    
  • warning: python-include-tests

    Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.

    Near pkgs/development/python-modules/incapsula-cracker-py3/default.nix:22:0:

       |
    22 |     description = "Bypass sites guarded with Incapsula";
       | ^
    

Result of nixpkgs-review pr 117412 at f718565 run on x86_64-linux 1

2 packages built successfully:
  • python38Packages.incapsula-cracker-py3
  • python39Packages.incapsula-cracker-py3
2 suggestions:
  • warning: maintainers-missing

    Package does not have a maintainer. Consider adding yourself?

    Near pkgs/development/python-modules/incapsula-cracker-py3/default.nix:21:3:

       |
    21 |   meta = with lib; {
       |   ^
    
  • warning: python-include-tests

    Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.

    Near pkgs/development/python-modules/incapsula-cracker-py3/default.nix:22:0:

       |
    22 |     description = "Bypass sites guarded with Incapsula";
       | ^
    


prePatch = ''
substituteInPlace setup.py \
--replace "bs4" "beautifulsoup4"
Copy link
Member

Choose a reason for hiding this comment

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

This was fixed upstream (ziplokk1/incapsula-cracker-py3#25) in the meantime. But no new release was made.

Copy link
Contributor

Choose a reason for hiding this comment

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

So until it is released, we need this local patch

Copy link
Member

Choose a reason for hiding this comment

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

Yes

@stale
Copy link

stale bot commented Apr 18, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2022
@seghers seghers closed this Jun 23, 2022
@seghers seghers deleted the pythonPackages.incapsula-cracker-py3 branch June 23, 2022 21:28
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

6 participants