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.locust: init at 2.14.1 #199746

Closed
wants to merge 2 commits into from
Closed

Conversation

shyim
Copy link
Member

@shyim shyim commented Nov 5, 2022

Description of changes

Packed the open source load test tool locustio. It was a while ago packaged but has been removed because it was unmaintained in #104351

So this reads the newest version and makes me the maintainer

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@shyim shyim requested review from FRidh and jonringer as code owners November 5, 2022 19:10
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Nov 5, 2022
@tpwrules
Copy link
Contributor

I can't get this to build due to problems with mypy. I tried the commit as it is and rebased on current master and both failed.

@shyim
Copy link
Member Author

shyim commented Jan 14, 2023

What was the error?

@tpwrules
Copy link
Contributor

It was Tox complaining that mypy could not be installed. I modified the derivation to install it, then mypy complained that the tests did not pass.

This should be rebased on current master, upgraded to latest locustio, then I will review it again.

@shyim shyim changed the title Add locustio python3Packages.locustio: init at 2.14.1 Jan 18, 2023
@shyim
Copy link
Member Author

shyim commented Jan 18, 2023

@tpwrules do you want to try out again?

@tpwrules
Copy link
Contributor

This still does not work:

error: builder for '/nix/store/ps9wmd9zal6cci106hlg1cgd2qj7lad4-python3.11-locustio-2.14.1.drv' failed with exit code 1;
       last 10 log lines:
       > adding 'locust-0.0.0.dist-info/RECORD'
       > removing build/bdist.linux-x86_64/wheel
       > Finished executing setuptoolsBuildPhase
       > installing
       > Executing pipInstallPhase
       > /build/source/dist /build/source
       > Processing ./locust-0.0.0-py3-none-any.whl
       > ERROR: Could not find a version that satisfies the requirement gevent>=20.12.1 (from locust) (from versions: none)
       > ERROR: No matching distribution found for gevent>=20.12.1
       > 
       For full logs, run 'nix log /nix/store/ps9wmd9zal6cci106hlg1cgd2qj7lad4-python3.11-locustio-2.14.1.drv'.
error: builder for '/nix/store/77pww50w9a9rw462g2mdsckd7s4svv6b-python3.10-locustio-2.14.1.drv' failed with exit code 1;
       last 10 log lines:
       > Rewriting #!/nix/store/abax98471z8fshv4b9p46bkh3lxmpy0z-python3-3.10.9/bin/python3.10 to #!/nix/store/abax98471z8fshv4b9p46bkh3lxmpy0z-python3-3.10.9
       > wrapping `/nix/store/lpskblj1qz49c0373vxqglzl9h8v374j-python3.10-locustio-2.14.1/bin/locust'...
       > Executing pythonRemoveTestsDir
       > Finished executing pythonRemoveTestsDir
       > running install tests
       > mypy: install_deps> python -I -m pip install mypy==0.981
       > mypy: exit 1 (8.69 seconds) /build/source> python -I -m pip install mypy==0.981 pid=337
       >   mypy: FAIL code 1 (9.08 seconds)
       >   evaluation failed :( (9.34 seconds)
       > 
       For full logs, run 'nix log /nix/store/77pww50w9a9rw462g2mdsckd7s4svv6b-python3.10-locustio-2.14.1.drv'.

Can you explain how you are testing and confirm it works for you? I used nixpkgs-review to check.

@shyim
Copy link
Member Author

shyim commented Jan 19, 2023

Just run nix build. Maybe something because I built it on macOS and the sandbox is not so good. I will look later on Linux

@thornycrackers
Copy link
Contributor

Can we rename this to locust instead of locustio? The tool is canonically referred to as locust everywhere.

@adisbladis
Copy link
Member

Can we rename this to locust instead of locustio? The tool is canonically referred to as locust everywhere.

Good catch. locust is the canonical pypi name: https://pypi.org/project/locust/

};

patchPhase = ''
echo 'version = "${version}"' > locust/_version.py
Copy link
Member

Choose a reason for hiding this comment

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

I would use postPatch instead so as not to preempt the full patchingPhase. Alternatively call the runHook prePatch/postPatch

@teto
Copy link
Member

teto commented Aug 12, 2023

main folder contains a pryproject.toml https://github.com/locustio/locust/blob/master/pyproject.toml have you tried packaging it with poetry2nix ? it should make the package easier to maintain.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@erictapen erictapen changed the title python3Packages.locustio: init at 2.14.1 python3Packages.locust: init at 2.14.1 Jul 2, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 2, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@shyim shyim closed this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants