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

The package pytrustnfe3 #2

Open
PedroRegisPOAR opened this issue Sep 10, 2021 · 2 comments
Open

The package pytrustnfe3 #2

PedroRegisPOAR opened this issue Sep 10, 2021 · 2 comments

Comments

@PedroRegisPOAR
Copy link
Contributor

PedroRegisPOAR commented Sep 10, 2021

TODO: https://github.com/NixOS/nixpkgs/blob/23e0738cf3fafb70443e415c689be3501b43658d/pkgs/development/interpreters/python/manylinux/default.nix

https://github.com/danimaribeiro/PyTrustNFe/blob/8d4bf9014e08b6aa8ca4d61872ceae319de3e10e/setup.py#L54

podman \
run \
--entrypoint=/bin/bash \
--interactive=true \
--name=container-pytrustnfe \
--tty=false \
--rm=true \
docker.io/library/python:3.9.7-slim-bullseye \
<<COMMANDS
apt-get update \
&& apt-get \
install \
-y \
--no-install-recommends \
gcc \
python3-pip \
python3-wheel \
python3-setuptools \
python3-openssl \
python3-lxml \
libxmlsec1-dev \
pkg-config \
&& pip install pytrustnfe3 \
&& python -c 'import pytrustnfe; print(pytrustnfe.__package__)' \
&& pip freeze
COMMANDS
podman \
run \
--entrypoint=/bin/bash \
--interactive=true \
--name=container-pytrustnfe \
--tty=false \
--rm=true \
docker.io/library/python:3.9.7-slim-bullseye \
<<COMMANDS
pip install pytrustnfe3 \
&& python -c 'import pytrustnfe; print(pytrustnfe.__package__)' \
&& pip freeze
COMMANDS
podman \
run \
--entrypoint=/bin/bash \
--interactive=true \
--tty=true \
--rm=true \
docker.io/library/python:3.9.7-slim-bullseye
apt-get update \
&& apt-get \
install \
-y \
--no-install-recommends \
gcc \
libxmlsec1-dev \
pkg-config
podman \
run \
--entrypoint=/bin/bash \
--interactive=true \
--tty=false \
--rm=true \
docker.io/library/python:3.9.7-slim-bullseye \
<<COMMANDS
pip install poetry==1.8.4 \
&& python --version \
&& mkdir -p ~/testpytrustnfe3 \
&& cd ~/testpytrustnfe3 \
&& poetry init --no-interaction  \
&& poetry lock \
&& poetry show --tree \
&& poetry add pytrustnfe3==2.0.1  \
&& poetry lock \
&& poetry show --tree \
&& poetry run python -c 'import pytrustnfe; print(pytrustnfe.__package__)'
COMMANDS
@PedroRegisPOAR
Copy link
Contributor Author

PedroRegisPOAR commented Sep 10, 2021

podman \
run \
--env=PATH=/root/.nix-profile/bin:/usr/bin:/bin \
--events-backend=file \
--env="DISPLAY=${DISPLAY:-:0.0}" \
--interactive=true \
--privileged=true \
--tty=true \
--rm=true \
--user=0 \
docker.nix-community.org/nixpkgs/nix-flakes
# --env=PATH=/root/.nix-profile/bin:/usr/bin:/bin \
podman \
run \
--events-backend=file \
--env="DISPLAY=${DISPLAY:-:0.0}" \
--interactive=true \
--privileged=true \
--tty=false \
--rm=true \
docker.nix-community.org/nixpkgs/nix-flakes \
bash <<'COMMANDS'
nix \
profile \
install \
github:NixOS/nixpkgs/080166c15633801df010977d9d7474b4a6c549d7#poetry \
&& poetry --version

mkdir -p ~/testpytrustnfe3 \
&& cd ~/testpytrustnfe3 \
&& poetry init --no-interaction  \
&& poetry lock \
&& poetry show --tree \
&& poetry add pytrustnfe3==2.0.1  \
&& poetry lock \
&& poetry show --tree \
&& poetry run python -c 'import pytrustnfe; print(pytrustnfe.__package__)'
COMMANDS
mkdir --parent --mode=0755 ~/.config/nix \
&& echo 'system-features = benchmark big-parallel kvm nixos-test' >> ~/.config/nix/nix.conf \
&& echo 'experimental-features = nix-command flakes ca-references ca-derivations' >> ~/.config/nix/nix.conf \
&& echo 'show-trace = true' >> ~/.config/nix/nix.conf \
&& mkdir --parent --mode=0755 ~/.config/nixpkgs \
&& echo '{ allowUnfree = true; }' >> ~/.config/nixpkgs/config.nix
nix \
profile \
install \
nixpkgs#poetry \
nixpkgs#gcc \
nixpkgs#xmlsec \
nixpkgs#pkg-config \
nixpkgs#python39Full.pkgs.pip \
nixpkgs#python39Packages.xmlsec
nix \
profile \
install \
nixpkgs#bashInteractive \
nixpkgs#coreutils \
nixpkgs#poetry \
nixpkgs#gcc \
nixpkgs#xmlsec \
nixpkgs#pkg-config \
nixpkgs#python39Full.pkgs.pip

poetry init --no-interaction \
&& poetry lock \
&& poetry show --tree \
&& poetry add pytrustnfe3==1.0.60  \
&& poetry lock \
&& poetry show --tree \
&& poetry run python -c 'import pytrustnfe; print(pytrustnfe.__package__)'

poetry config --list
poetry config virtualenvs.create false
export LD_LIBRARY_PATH=$(nix eval --raw nixpkgs#xmlsec)/bin/xmlsec1
ln -fsv $(nix eval --raw nixpkgs#xmlsec)/bin/xmlsec1 /root/.cache/pypoetry/virtualenvs/-il7asoJj-py3.9/include/site/python3.9/xmlsec

@PedroRegisPOAR PedroRegisPOAR changed the title The package The package pytrustnfe3 Sep 20, 2021
@PedroRegisPOAR
Copy link
Contributor Author

PedroRegisPOAR commented Aug 4, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant