From 6cee629e76086f252dc5f556911b1ba3b49e8bf1 Mon Sep 17 00:00:00 2001 From: wingolab Date: Fri, 20 Oct 2023 22:32:45 -0400 Subject: [PATCH 1/2] Clarify installation --- perl/README.md | 60 ++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/perl/README.md b/perl/README.md index 234c85c56..9b2d4030a 100644 --- a/perl/README.md +++ b/perl/README.md @@ -9,7 +9,7 @@ To build a docker image using the `Dockerfile`, run the following: docker build --tag bystro-cli . ``` -## Installing Bystro using `cpam` +## Installing Bystro using `cpanm` The instructions for installing Bystro locally uses [`cpanm`](https://metacpan.org/pod/App::cpanminus). @@ -38,42 +38,18 @@ The remaining dependencies are installed like this: cpanm --installdeps . ``` -After installing dependencies, use `prove -lr t` to run tests. - -## Installing Bystro locally using dzil - -Bystro uses [`Dist::Zilla`](https://github.com/rjbs/dist-zilla) for packaging and is configured with `dist.ini`. -This approach requires installing `Dist::Zilla` and author dependencies and one off-dependencies described in the above. - -```bash -# Install Dist::Zilla and Archive::Tar::Wrapper (to slightly speed up building) -cpanm --quiet Dist::Zilla Archive::Tar::Wrapper - -# Install build dependencies -dzil authordeps --missing | cpanm --quiet - -# Install Bystro dependencies -dzil listdeps --missing | cpanm --quiet - -# Install Bystro -dzil install -``` - ## Install Bystro using `cpm` Install [cpm](https://metacpan.org/pod/App::cpm) with `curl -fsSL https://raw.githubusercontent.com/skaji/cpm/main/cpm | perl - install -g App::cpm`. ```bash # install msgpack fork -cpm https://github.com/bystrogenomics/msgpack-perl.git +cpm install -g https://github.com/bystrogenomics/msgpack-perl.git # install MouseX::Getopt despite some tests failing -cpm --no-test MouseX::Getopt +cpm install -g --no-test MouseX::Getopt # install LMDB_File that comes with latest LMDB -# NOTE: you will need mysql_config to install this -# ubuntu 22.04 LTS => sudo apt install -y libmariadb-dev libmariadb-dev-compat -# amazon 2023 => sudo yum install -y git clone --depth 1 --recurse-submodules https://github.com/salortiz/LMDB_File.git \ && cd LMDB_File \ && cpanm . \ @@ -81,7 +57,10 @@ git clone --depth 1 --recurse-submodules https://github.com/salortiz/LMDB_File.g && rm -rf LMDB_File # install mysql driver -cpm DBD::mysql@4.051 +# NOTE: you will need mysql_config to install this +# ubuntu 22.04 LTS => sudo apt install -y libmariadb-dev libmariadb-dev-compat +# amazon 2023 => sudo yum install -y mariadb105-devel.x86_64 +cpm install -g DBD::mysql@4.051 # clone bystro and change into perl package git clone git@github.com:bystrogenomics/bystro.git && cd bystro/perl @@ -90,7 +69,30 @@ git clone git@github.com:bystrogenomics/bystro.git && cd bystro/perl cpm install -g --with-develop # Install dzil build dependencies -RUN cpm install -g --show-build-log-on-failure $(dzil authordeps --missing) +RUN cpm install -g $(dzil authordeps --missing) +``` + +After installing dependencies, use `prove -lr t` to run tests. + +## Installing development tools + +These are tools needed for packaging and releasing Bystro's Perl package, which are not needed for normal testing or development. + +Bystro uses [`Dist::Zilla`](https://github.com/rjbs/dist-zilla) for packaging and is configured with `dist.ini`. +This approach requires installing `Dist::Zilla` and author dependencies and one off-dependencies described in the above. + +```bash +# Install Dist::Zilla and Archive::Tar::Wrapper (to slightly speed up building) +cpanm --quiet Dist::Zilla Archive::Tar::Wrapper + +# Install build dependencies +dzil authordeps --missing | cpanm --quiet + +# Install Bystro dependencies +dzil listdeps --missing | cpanm --quiet + +# Install Bystro +dzil install ``` ## Coding style and tidying From fd8ae3f03d93e2512194fcf34ba13800f0e5d83a Mon Sep 17 00:00:00 2001 From: wingolab Date: Fri, 20 Oct 2023 22:40:13 -0400 Subject: [PATCH 2/2] Update README.md --- perl/README.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/perl/README.md b/perl/README.md index 9b2d4030a..fc833153e 100644 --- a/perl/README.md +++ b/perl/README.md @@ -19,16 +19,23 @@ But there are a few one-off dependencies that require a slightly modified approa One-off dependencies can be installed as follows: ```bash +# install msgpack fork cpanm --quiet https://github.com/bystrogenomics/msgpack-perl.git + +# install MouseX::Getopt despite some tests failing cpanm --quiet --notest MouseX::Getopt + +# install LMDB_File that comes with latest LMDB git clone --depth 1 --recurse-submodules https://github.com/salortiz/LMDB_File.git \ && cd LMDB_File \ && cpanm --quiet . \ && cd .. \ && rm -rf LMDB_File + +# install mysql driver # NOTE: you will need mysql_config to install this # ubuntu 22.04 LTS => sudo apt install -y libmariadb-dev libmariadb-dev-compat -# amazon 2023 => sudo yum install -y +# amazon 2023 => sudo yum install -y mariadb105-devel.x86_64 cpanm --quiet DBD::mysql@4.051 ``` @@ -65,11 +72,8 @@ cpm install -g DBD::mysql@4.051 # clone bystro and change into perl package git clone git@github.com:bystrogenomics/bystro.git && cd bystro/perl -# install dependencies +# install dependencies (uses cpanfile) cpm install -g --with-develop - -# Install dzil build dependencies -RUN cpm install -g $(dzil authordeps --missing) ``` After installing dependencies, use `prove -lr t` to run tests. @@ -84,15 +88,19 @@ This approach requires installing `Dist::Zilla` and author dependencies and one ```bash # Install Dist::Zilla and Archive::Tar::Wrapper (to slightly speed up building) cpanm --quiet Dist::Zilla Archive::Tar::Wrapper +# - or - +cpm install -g Dist::Zilla Archive::Tar::Wrapper # Install build dependencies dzil authordeps --missing | cpanm --quiet +# - or - +cpm install -g $(dzil authordeps --missing) -# Install Bystro dependencies -dzil listdeps --missing | cpanm --quiet - -# Install Bystro +# Install Bystro Package dzil install + +# Test Bystro Package +dzil test --all ``` ## Coding style and tidying