Re: perl --version is not at perl5.36 but at perl5.34 yet both are listed as active

2023-08-13 Thread Kenneth Wolcott
HI Bill;

  Thanks for your reply.

  I'll point to /opt/local/bin/perl5.36 in my scripts.

Thanks,
Ken


Re: perl --version is not at perl5.36 but at perl5.34 yet both are listed as active

2023-08-13 Thread Bill Cole

On 2023-08-13 at 20:21:23 UTC-0400 (Sun, 13 Aug 2023 17:21:23 -0700)
Kenneth Wolcott 
is rumored to have said:


Hi;

  I'm confused about what Perl I have installed vi MacPorts and what
is active and what I can use.


The short simple answer is: BOTH.



port installed | grep perl5
  ack @3.6.0_0+perl5_34
  ack @3.7.0_0+perl5_34 (active)
  docbook2X @0.8.8_11+perl5_34 (active)
  git 
@2.39.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git 
@2.39.2_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git 
@2.40.0_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git 
@2.40.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git 
@2.41.0_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34 
(active)

  icoutils @0.32.3_1+perl5_34 (active)
  net-snmp @5.9.1_1+perl5_34+ssl (active)
  ossp-uuid @1.6.2_13+perl5_34+universal
  ossp-uuid @1.6.2_13+perl5_34 (active)
  perl5 @5.34.1_0+perl5_34 (active)
  perl5.34 @5.34.1_0 (active)
  perl5.36 @5.36.0_0
  perl5.36 @5.36.1_0 (active)
  po4a @0.66_0+perl5_34 (active)
  xmltoman @0.4_1+perl5_34 (active)

which perl
/opt/local/bin/perl

perl --version | head -2 | tail -1
This is perl 5, version 34, subversion 1 (v5.34.1) built for
darwin-thread-multi-2level


Note the illuminating output of "ls -l /opt/local/bin/perl*"

Which version is pointed to by the 'perl' symlink is determined by the 
variant of the perl5 port.




It looks like many perl5-based utilities are not yet updated to
perl5.36, yet I'd like to use perl5.36 when I'm writing a perl
program.


The layout of perl's components allows you to have multiple independent 
versions  installed without interfering with each other. In theory.




I apparently don't understand enough about how to use "port select"
even after several readings.


Yeah, I don't think the perl-select port works.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


perl --version is not at perl5.36 but at perl5.34 yet both are listed as active

2023-08-13 Thread Kenneth Wolcott
Hi;

  I'm confused about what Perl I have installed vi MacPorts and what
is active and what I can use.

port installed | grep perl5
  ack @3.6.0_0+perl5_34
  ack @3.7.0_0+perl5_34 (active)
  docbook2X @0.8.8_11+perl5_34 (active)
  git @2.39.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git @2.39.2_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git @2.40.0_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git @2.40.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34
  git @2.41.0_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_34 (active)
  icoutils @0.32.3_1+perl5_34 (active)
  net-snmp @5.9.1_1+perl5_34+ssl (active)
  ossp-uuid @1.6.2_13+perl5_34+universal
  ossp-uuid @1.6.2_13+perl5_34 (active)
  perl5 @5.34.1_0+perl5_34 (active)
  perl5.34 @5.34.1_0 (active)
  perl5.36 @5.36.0_0
  perl5.36 @5.36.1_0 (active)
  po4a @0.66_0+perl5_34 (active)
  xmltoman @0.4_1+perl5_34 (active)

which perl
/opt/local/bin/perl

perl --version | head -2 | tail -1
This is perl 5, version 34, subversion 1 (v5.34.1) built for
darwin-thread-multi-2level

It looks like many perl5-based utilities are not yet updated to
perl5.36, yet I'd like to use perl5.36 when I'm writing a perl
program.

I apparently don't understand enough about how to use "port select"
even after several readings.

On a slightly off-topic question, I'm still trying to replace all
"universal" ports with aarch64 ports (native) and when I install
and/or upgrade, I always specify "-s".  I've only had one problem (so
far) with this.

Thanks,
Ken Wolcott


Mystery running pip in destroot phase

2023-08-13 Thread René J . V . Bertin
Hi,

I'm running into a mystery trying to install from a python source tarball using 
pip, in the destroot phase of a port. That sounds like a question for the -dev 
ML; I'm posting it here because I think it's really a question about python.

I have this snippet of portfile code:

{{{
destroot.cmd${prefix}/bin/pip-${python.branch}
destroot.args   --no-deps --no-cache-dir -I --root ${destroot} \
${distpath}/${distfiles}
destroot.post_args
pre-destroot {
system "printenv"
system "${destroot.cmd} install --user setuptools"
}
}}}

The first few lines ensure that pip is run with `--no-deps --no-cache-dir -I` 
on the source tarball, installing under the $destroot "distribution" dir. The 
`pre-destroot` step prints out the environment and  then attempts to make 
certain that a copy of the setuptools are available (redundant, but see below).

I get this output, omitting the output from `printenv`:

{{{
Requirement already satisfied: setuptools in 
/opt/local/lib/python3.9/site-packages (60.2.0)
Processing 
/opt/local/var/lnxports/distfiles/py-dbusmock/python-dbusmock-0.29.1.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
  ERROR: Could not find a version that satisfies the requirement 
setuptools>=45 (from versions: none)
  ERROR: No matching distribution found for setuptools>=45
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem 
with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with 
pip.
}}}

The 1st line indicates that pip finds `setuptools`, in a new-enough version. 
Yet when the actual install is attempted an error is raised that this very 
package cannot be found.

This seems to hinge on the fact that "base" sets the $HOME directory to a 
temporary (sandboxed) one under the port's work directory.

Any experienced Python users on this list who have an idea what's going on? I 
get the same error when I omit `--no-deps`.

Thanks,
R.