Re: [how to install 0.5.2 with python2.7?] (was: how to install kallithea from source)

2020-08-14 Thread Thomas De Schampheleire
Hi Uwe,

On Fri, Aug 14, 2020, 17:35 Uwe Brauer  wrote:

> >>> "MK" == Mads Kiilerich 
> writes:
>
>> On 8/13/20 9:15 PM, Uwe Brauer wrote:
>>> which version (changeset) requires only 3.5)??
>
>
>> 3.6 was the first python3 we supported. (Inherited from the versions
>> supported by Mercurial).
>
>> 3.5 was never supported.
>
>> 0.5.2 aa0a637fa6f6 was the last py2 version.
>
> Ok this is from February this year not too old.
>
> However the instructions in
> https://kallithea.readthedocs.io/en/stable/installation.html
>
> Seem not to work because
> python -m venv ../kallithea-venv
>
> Does not work
> usr/bin/python: No module named venv
>
> So how can I install it with python2.7?
>

Our docs on readthedocs do not currently retain documentation for obsolete
versions. I'm not sure if this is really good practice, but today it's like
that.

To get documentation for your chosen version, please see the 'docs'
directory in the kallithea source distribution and find the appropriate rst
file.
You could also generate the html pages via 'make html' inside the docs
directory, after having installed the required dependencies. Since you
already have trouble setting up the virtual env this may be a step too far.

Best regards,
Thomas
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


[how to install 0.5.2 with python2.7?] (was: how to install kallithea from source)

2020-08-14 Thread Uwe Brauer
>>> "MK" == Mads Kiilerich  
>>> writes:

   > On 8/13/20 9:15 PM, Uwe Brauer wrote:
   >> which version (changeset) requires only 3.5)?? 


   > 3.6 was the first python3 we supported. (Inherited from the versions
   > supported by Mercurial).

   > 3.5 was never supported.

   > 0.5.2 aa0a637fa6f6 was the last py2 version.

Ok this is from February this year not too old.

However the instructions in 
https://kallithea.readthedocs.io/en/stable/installation.html

Seem not to work because 
python -m venv ../kallithea-venv

Does not work
usr/bin/python: No module named venv

So how can I install it with python2.7?

Uwe 


smime.p7s
Description: S/MIME cryptographic signature
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Mads Kiilerich

On 8/13/20 9:15 PM, Uwe Brauer wrote:
which version (changeset) requires only 3.5)?? 



3.6 was the first python3 we supported. (Inherited from the versions 
supported by Mercurial).


3.5 was never supported.

0.5.2 aa0a637fa6f6 was the last py2 version.


For a simple test I think that should be sufficient, buy only if you
don't tell me that such a kallithea version lacks a lot of important
features.



I don't think there have been any big new features since. Mainly a lot 
of maturity changes.


/Mads

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


[Python 3.6, 3.7 3.8] (was: how to install kallithea from source)

2020-08-13 Thread Uwe Brauer
>>> "MK" == Mads Kiilerich  writes:

   > On 8/13/20 8:53 PM, Uwe Brauer wrote:
   >>> I suggest creating /srv/kallithea as root, and chown it to the
   >>> kallithea user. (I am trying to tweak the documentation based on your
   >>> input and already had some draft changes to this.)
   >> Good, at least something useful will come out from my intents. ;-)
   >> 
   >> 
   >> When you say kallithea user, do you mean me, or do you mean that I shall
   >> create a user (and group) named kallithea?


It seems possible to install python 3.6/3.7/3.8 on Ubuntu 16.04.

I'd say newer is better, but maybe this is not true, any
recommendations?

Uwe 


smime.p7s
Description: S/MIME cryptographic signature
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Uwe Brauer
>>> "MK" == Mads Kiilerich  writes:

   > On 8/13/20 8:53 PM, Uwe Brauer wrote:
   >>> I suggest creating /srv/kallithea as root, and chown it to the
   >>> kallithea user. (I am trying to tweak the documentation based on your
   >>> input and already had some draft changes to this.)
   >> Good, at least something useful will come out from my intents. ;-)
   >> 
   >> 
   >> When you say kallithea user, do you mean me, or do you mean that I shall
   >> create a user (and group) named kallithea?


   > Yes, I recommend running Kallithea as a separate user to control how
   > it can interact with other system users.

   > You *could* run Kallithea as you (especially if evaluating or
   > developing), but for production it should be a separate user.


   >>> Other than creating the installation directory (which could be
   >>> elsewhere), there should not be any global or .local changes. Just
   >>> active the virtualenv first (or run binaries in the virtualenv's bin
   >>> directory).
   >> 
   >> Well I tried to do this, but it failed again.
   >> 
   >> Here is what I did, using bash
   >> 
   >> sudo mkdir /srv/kallithea
   >> sudo chown -R oub /srv/kallithea
   >> sudo chgrp -R oub /srv/kallithea
   >> cd $HOME/src/kallithea
   >> python3 -m venv /srv/kallithea/venv
   >> . /srv/kallithea/venv/bin/activate
   >> pip install --upgrade pip setuptools
   >> pip install --upgrade kallithea
   >> 
   >> ,
   >> | ERROR: Command errored out with exit status 1:
   >> |
   >> |  command: /srv/kallithea/venv/bin/python3 -c 'import sys,
   >> |  setuptools, tokenize; sys.argv[0] =
   >> |  '"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';
   >> |  
__file__='"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';f=getattr(tokenize,
   >> |  '"'"'open'"'"',
   >> |  open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
   >> |  '"'"'\n'"'"');f.close();exec(compile(code, __file__,
   >> |  '"'"'exec'"'"'))' egg_info --egg-base
   >> |  /tmp/pip-pip-egg-info-3uwu0aad
   >> |
   >> |  cwd: /tmp/pip-install-ydr3jegw/kallithea/
   >> | Complete output (5 lines):
   >> | Traceback (most recent call last):
   >> |   File "", line 1, in 
   >> |   File "/tmp/pip-install-ydr3jegw/kallithea/setup.py", line 13, in 

   >> | raise Exception('Kallithea requires Python 3.6 or later')
   >> | Exception: Kallithea requires Python 3.6 or later
   >> | 
   >> | ERROR: Command errored out with exit status 1: python setup.py egg_info 
Check the logs for full command output.
   >> `


   > DOH. Now i notice what I think Thomas mentioned earlier. Kallithea
   > does indeed require Python 3.6 or later. And it seems like your system
   > is using 3.5?

Yes, I am still on Ubuntu 16.04

   > Which Ubuntu version are you using now? I guess they have later Python
   > versions available as standard packages, properly namespaced to avoid 
   > conflicts. If creating the virtualenv with for example python3.8, your
   > /srv/kallithea/venv/bin/python3 and everything in the venv will use
   > that too.

Hm, that would be a possibility. 

But: I also cloned the whole beast, therefore: 

which version (changeset) requires only 3.5)??

For a simple test I think that should be sufficient, buy only if you
don't tell me that such a kallithea version lacks a lot of important
features.

Uwe 



smime.p7s
Description: S/MIME cryptographic signature
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Mads Kiilerich

On 8/13/20 8:53 PM, Uwe Brauer wrote:

I suggest creating /srv/kallithea as root, and chown it to the
kallithea user. (I am trying to tweak the documentation based on your
input and already had some draft changes to this.)

Good, at least something useful will come out from my intents. ;-)


When you say kallithea user, do you mean me, or do you mean that I shall
create a user (and group) named kallithea?



Yes, I recommend running Kallithea as a separate user to control how it 
can interact with other system users.


You *could* run Kallithea as you (especially if evaluating or 
developing), but for production it should be a separate user.




Other than creating the installation directory (which could be
elsewhere), there should not be any global or .local changes. Just
active the virtualenv first (or run binaries in the virtualenv's bin
directory).


Well I tried to do this, but it failed again.

Here is what I did, using bash

  sudo mkdir /srv/kallithea
  sudo chown -R oub /srv/kallithea
  sudo chgrp -R oub /srv/kallithea
  cd $HOME/src/kallithea
python3 -m venv /srv/kallithea/venv
. /srv/kallithea/venv/bin/activate
pip install --upgrade pip setuptools
pip install --upgrade kallithea

,
| ERROR: Command errored out with exit status 1:
|
|  command: /srv/kallithea/venv/bin/python3 -c 'import sys,
|  setuptools, tokenize; sys.argv[0] =
|  '"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';
|  
__file__='"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';f=getattr(tokenize,
|  '"'"'open'"'"',
|  open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
|  '"'"'\n'"'"');f.close();exec(compile(code, __file__,
|  '"'"'exec'"'"'))' egg_info --egg-base
|  /tmp/pip-pip-egg-info-3uwu0aad
|
|  cwd: /tmp/pip-install-ydr3jegw/kallithea/
| Complete output (5 lines):
| Traceback (most recent call last):
|   File "", line 1, in 
|   File "/tmp/pip-install-ydr3jegw/kallithea/setup.py", line 13, in 

| raise Exception('Kallithea requires Python 3.6 or later')
| Exception: Kallithea requires Python 3.6 or later
| 
| ERROR: Command errored out with exit status 1: python setup.py egg_info Check 
the logs for full command output.
`



DOH. Now i notice what I think Thomas mentioned earlier. Kallithea does 
indeed require Python 3.6 or later. And it seems like your system is 
using 3.5?


Which Ubuntu version are you using now? I guess they have later Python 
versions available as standard packages, properly namespaced to avoid 
conflicts. If creating the virtualenv with for example python3.8, your 
/srv/kallithea/venv/bin/python3 and everything in the venv will use that 
too.


/Mads

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Uwe Brauer
>>> "MK" == Mads Kiilerich  writes:

> On 8/13/20 7:54 PM, Uwe Brauer wrote:
>> > Hi Uwe,
>> > On Thu, Aug 13, 2020, 17:50 Uwe Brauer 
>> >  wrote:
>> 
>> 
>> > The '.' is an alias to the 'source' shell command. It reads and executes
>> > the file provided as arguments.
>> > See section "Shell Builtin Commands" at:
>> > https://linux.die.net/man/1/bash
>> 
>> Ah this is a bash thing, I have used only tcsh all my life and haven't
>> come across that.


> Ok. If using less common choices, some documentation will not apply
> directly ;-)

> https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments
> hints that you might be able to source activate.csh instead. Or just
> use bash for this.


I will use bash, no worries I am not religiously bound to csh and
friends.


>> But I still don't understand
>> 
>> 
>> cd kallithea  #OK
>> python3 -m venv ../kallithea-venv #OK
>> . ../kallithea-venv/bin/activate #OK
>> pip install --upgrade pip setuptools # this is system wide


> No, it is not system wide. When the virtualenv is activated, it will
> modify PATH to start with ../kallithea-venv/bin/ where it's own pip
> (and python) "binaries" are available - they will work inside the
> virtualenv, not globally.

Ok, makes sense 

> Since you are not running as root, there is also no way it could have
> modified anything system wide.

That is what confused me

>> pip install --upgrade -e . # this is system wide
>> python3 setup.py compile_catalog   # for translation of the UI
>> 
>> Now I get
>> pip install --upgrade -e . # this is system wide
>> ERROR: File "setup.py" not found. Directory cannot be installed in editable 
>> mode: /home/oub/src


> Are you still in the directory of the kallithea source (with a setup.py)?

Aeh, I forgot to delete  these lines, sorry ignore them, in fact I was
not in the correct directory.


>> pip install --upgrade -e .
>> ,
>> | Obtaining file:///home/oub/src/kallithea
>> | Complete output from command python setup.py egg_info:
>> | Traceback (most recent call last):
>> |   File "", line 1, in 
>> |   File "/home/oub/src/kallithea/setup.py", line 13, in 
>> | raise Exception('Kallithea requires Python 3.6 or later')
>> | Exception: Kallithea requires Python 3.6 or later
>> `
>> 
>> Ok so this is impossible. Sigh


> No, it is not impossible. You just didn't activate the virtualenv -
> thus the later commands doesn't work as intended. Either use bash, or 
> activate your csh.


>> Then I checked the documentation about virtualenv
>> 
>> python3 -m venv /srv/kallithea/venv
>> 
>> Gives me an error
>> Permission denied: '/srv/kallithea'
>> 
>> So shall I run this as root?


> I suggest creating /srv/kallithea as root, and chown it to the
> kallithea user. (I am trying to tweak the documentation based on your
> input and already had some draft changes to this.)

Good, at least something useful will come out from my intents. ;-)


When you say kallithea user, do you mean me, or do you mean that I shall
create a user (and group) named kallithea?


>> I am a bit confused about who (root or normal user) to install and
>> where, globally in the system or in .local


> Other than creating the installation directory (which could be
> elsewhere), there should not be any global or .local changes. Just 
> active the virtualenv first (or run binaries in the virtualenv's bin
> directory).


Well I tried to do this, but it failed again.

Here is what I did, using bash

 sudo mkdir /srv/kallithea
 sudo chown -R oub /srv/kallithea
 sudo chgrp -R oub /srv/kallithea
 cd $HOME/src/kallithea
python3 -m venv /srv/kallithea/venv
. /srv/kallithea/venv/bin/activate
pip install --upgrade pip setuptools
pip install --upgrade kallithea

,
| ERROR: Command errored out with exit status 1:
| 
|  command: /srv/kallithea/venv/bin/python3 -c 'import sys,
|  setuptools, tokenize; sys.argv[0] =
|  '"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';
|  
__file__='"'"'/tmp/pip-install-ydr3jegw/kallithea/setup.py'"'"';f=getattr(tokenize,
|  '"'"'open'"'"',
|  open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
|  '"'"'\n'"'"');f.close();exec(compile(code, __file__,
|  '"'"'exec'"'"'))' egg_info --egg-base
|  /tmp/pip-pip-egg-info-3uwu0aad
| 
|  cwd: /tmp/pip-install-ydr3jegw/kallithea/
| Complete output (5 lines):
| Traceback (most recent call last):
|   File "", line 1, in 
|   File "/tmp/pip-install-ydr3jegw/kallithea/setup.py", line 13, in 

| raise Exception('Kallithea requires Python 3.6 or later')
| Exception: Kallithea requires Python 3.6 or later
| 
| ERROR: Command errored out with exit status 1: python setup.py egg_info Check 
the logs for full command output.
`

Uwe 


smime.p7s
Description: S/MIME cryptographic signature
___
kallithea-general mailing list
kallithea-general@sfconservancy.org

Re: how to install kallithea from source

2020-08-13 Thread Mads Kiilerich

On 8/13/20 7:54 PM, Uwe Brauer wrote:

> Hi Uwe,
> On Thu, Aug 13, 2020, 17:50 Uwe Brauer 
 wrote:


> The '.' is an alias to the 'source' shell command. It reads and executes
> the file provided as arguments.
> See section "Shell Builtin Commands" at:
> https://linux.die.net/man/1/bash

Ah this is a bash thing, I have used only tcsh all my life and haven't
come across that.



Ok. If using less common choices, some documentation will not apply 
directly ;-)


https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments 
hints that you might be able to source activate.csh instead. Or just use 
bash for this.




But I still don't understand


cd kallithea  #OK
python3 -m venv ../kallithea-venv #OK
. ../kallithea-venv/bin/activate #OK
pip install --upgrade pip setuptools # this is system wide



No, it is not system wide. When the virtualenv is activated, it will 
modify PATH to start with ../kallithea-venv/bin/ where it's own pip (and 
python) "binaries" are available - they will work inside the virtualenv, 
not globally.


Since you are not running as root, there is also no way it could have 
modified anything system wide.




pip install --upgrade -e . # this is system wide
python3 setup.py compile_catalog   # for translation of the UI

Now I get
pip install --upgrade -e . # this is system wide
ERROR: File "setup.py" not found. Directory cannot be installed in editable 
mode: /home/oub/src



Are you still in the directory of the kallithea source (with a setup.py)?



pip install --upgrade -e .
,
| Obtaining file:///home/oub/src/kallithea
| Complete output from command python setup.py egg_info:
| Traceback (most recent call last):
|   File "", line 1, in 
|   File "/home/oub/src/kallithea/setup.py", line 13, in 
| raise Exception('Kallithea requires Python 3.6 or later')
| Exception: Kallithea requires Python 3.6 or later
`

Ok so this is impossible. Sigh



No, it is not impossible. You just didn't activate the virtualenv - thus 
the later commands doesn't work as intended. Either use bash, or 
activate your csh.




Then I checked the documentation about virtualenv

python3 -m venv /srv/kallithea/venv

Gives me an error
Permission denied: '/srv/kallithea'

So shall I run this as root?



I suggest creating /srv/kallithea as root, and chown it to the kallithea 
user. (I am trying to tweak the documentation based on your input and 
already had some draft changes to this.)




I am a bit confused about who (root or normal user) to install and
where, globally in the system or in .local



Other than creating the installation directory (which could be 
elsewhere), there should not be any global or .local changes. Just 
active the virtualenv first (or run binaries in the virtualenv's bin 
directory).


/Mads
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Uwe Brauer

   > Hi Uwe,
   > On Thu, Aug 13, 2020, 17:50 Uwe Brauer 
 wrote:


   > The '.' is an alias to the 'source' shell command. It reads and executes
   > the file provided as arguments.
   > See section "Shell Builtin Commands" at:
   > https://linux.die.net/man/1/bash

Ah this is a bash thing, I have used only tcsh all my life and haven't
come across that. 


   > The 'activate' script is provided by virtualenv/venv and sets certain
   > environment variables, like PATH to make sure the right python executable
   > and libraries are used.
   > This would not be possible of the script were directly executed, as opposed
   > to source'ing it, because environment variables set by a program or script
   > do not impact its parent (shell) process, only the program/script itself
   > and its children.

   > Note that virtualenv/venv will use the python3 found in PATH, so if you
   > only have python 3.5 you will still not be able to install kallithea.
   > If you can install python 3 6 or later in another way, you can make sure to
   > call that python executable instead of 'python3', e.g

   > python3.6 -m venv ../kallithea-venv

   > There exist ways to install a specific python version as a normal user,
   > e.g. with pyenv (https://github.com/pyenv/pyenv) or other similar tools.
   > You could also install a python version from source manually.

Yeah, but I think at this point Mads is most likely right, it is time to
say good by to Ubuntu 16.04 and  install 20.04. I am afraid to screw up
too many things if I have another python version in my machine

But I still don't understand


cd kallithea  #OK
python3 -m venv ../kallithea-venv #OK
. ../kallithea-venv/bin/activate #OK
pip install --upgrade pip setuptools # this is system wide
pip install --upgrade -e . # this is system wide
python3 setup.py compile_catalog   # for translation of the UI

Now I get 
pip install --upgrade -e . # this is system wide
ERROR: File "setup.py" not found. Directory cannot be installed in editable 
mode: /home/oub/src

pip install --upgrade -e .
,
| Obtaining file:///home/oub/src/kallithea
| Complete output from command python setup.py egg_info:
| Traceback (most recent call last):
|   File "", line 1, in 
|   File "/home/oub/src/kallithea/setup.py", line 13, in 
| raise Exception('Kallithea requires Python 3.6 or later')
| Exception: Kallithea requires Python 3.6 or later
`

Ok so this is impossible. Sigh


Then I checked the documentation about virtualenv

python3 -m venv /srv/kallithea/venv

Gives me an error
Permission denied: '/srv/kallithea'

So shall I run this as root?

I am a bit confused about who (root or normal user) to install and
where, globally in the system or in .local

The documentation tells me 

mkdir /srv/kallithea

That obviously does not work, so shall I do this as root and then change
the owner and group. Sorry but the documentation is a bit unclear here.



smime.p7s
Description: S/MIME cryptographic signature
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Mads Kiilerich

On 8/13/20 5:45 PM, Uwe Brauer wrote:

Hi

Since I cannot install kallitea via pip (my python version in Ubuntu
16.04 is too old) I thought to give the installation from source a try.


The documentation in
https://kallithea.readthedocs.io/en/stable/installation.html

Reads

,
| hg clone https://kallithea-scm.org/repos/kallithea -u stable
| cd kallithea
| python3 -m venv ../kallithea-venv
| . ../kallithea-venv/bin/activate
| pip install --upgrade pip setuptools
| pip install --upgrade -e .
| python3 setup.py compile_catalog   # for translation of the UI
`

I don't understand the lines

  python3 -m venv ../kallithea-venv
  . ../kallithea-venv/bin/activate

Is this supposed to be one line?
What does the . At the beginning of the second line supposed to be?


No, that is two separate commands that can be run as written.

`.` is a `sh` command for sourcing another file. In recent derivates 
like bash it can also be invoked as `source`. See `help .` and `help 
source` and 
https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments 
(and https://kallithea-scm.org/repos/kallithea/changeset/855ba1f07aeb ).


/Mads



/Mads

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Thomas De Schampheleire
(explicitly address Uwe)

On Thu, Aug 13, 2020, 18:16 Thomas De Schampheleire <
patrickdeping...@gmail.com> wrote:

> Hi Uwe,
>
> On Thu, Aug 13, 2020, 17:50 Uwe Brauer  wrote:
>
>>
>> Hi
>>
>> Since I cannot install kallitea via pip (my python version in Ubuntu
>> 16.04 is too old) I thought to give the installation from source a try.
>>
>>
>> The documentation in
>> https://kallithea.readthedocs.io/en/stable/installation.html
>>
>> Reads
>>
>> ,
>> | hg clone https://kallithea-scm.org/repos/kallithea -u stable
>> | cd kallithea
>> | python3 -m venv ../kallithea-venv
>> | . ../kallithea-venv/bin/activate
>> | pip install --upgrade pip setuptools
>> | pip install --upgrade -e .
>> | python3 setup.py compile_catalog   # for translation of the UI
>> `
>>
>> I don't understand the lines
>>
>>  python3 -m venv ../kallithea-venv
>>  . ../kallithea-venv/bin/activate
>>
>> Is this supposed to be one line?
>> What does the . At the beginning of the second line supposed to be?
>>
>
> The '.' is an alias to the 'source' shell command. It reads and executes
> the file provided as arguments.
> See section "Shell Builtin Commands" at:
> https://linux.die.net/man/1/bash
>
> The 'activate' script is provided by virtualenv/venv and sets certain
> environment variables, like PATH to make sure the right python executable
> and libraries are used.
> This would not be possible of the script were directly executed, as
> opposed to source'ing it, because environment variables set by a program or
> script do not impact its parent (shell) process, only the program/script
> itself and its children.
>
> Note that virtualenv/venv will use the python3 found in PATH, so if you
> only have python 3.5 you will still not be able to install kallithea.
> If you can install python 3 6 or later in another way, you can make sure
> to call that python executable instead of 'python3', e.g
>
> python3.6 -m venv ../kallithea-venv
>
> There exist ways to install a specific python version as a normal user,
> e.g. with pyenv (https://github.com/pyenv/pyenv) or other similar tools.
> You could also install a python version from source manually.
>
> Best regards,
> Thomas
>
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: how to install kallithea from source

2020-08-13 Thread Thomas De Schampheleire
Hi Uwe,

On Thu, Aug 13, 2020, 17:50 Uwe Brauer  wrote:

>
> Hi
>
> Since I cannot install kallitea via pip (my python version in Ubuntu
> 16.04 is too old) I thought to give the installation from source a try.
>
>
> The documentation in
> https://kallithea.readthedocs.io/en/stable/installation.html
>
> Reads
>
> ,
> | hg clone https://kallithea-scm.org/repos/kallithea -u stable
> | cd kallithea
> | python3 -m venv ../kallithea-venv
> | . ../kallithea-venv/bin/activate
> | pip install --upgrade pip setuptools
> | pip install --upgrade -e .
> | python3 setup.py compile_catalog   # for translation of the UI
> `
>
> I don't understand the lines
>
>  python3 -m venv ../kallithea-venv
>  . ../kallithea-venv/bin/activate
>
> Is this supposed to be one line?
> What does the . At the beginning of the second line supposed to be?
>

The '.' is an alias to the 'source' shell command. It reads and executes
the file provided as arguments.
See section "Shell Builtin Commands" at:
https://linux.die.net/man/1/bash

The 'activate' script is provided by virtualenv/venv and sets certain
environment variables, like PATH to make sure the right python executable
and libraries are used.
This would not be possible of the script were directly executed, as opposed
to source'ing it, because environment variables set by a program or script
do not impact its parent (shell) process, only the program/script itself
and its children.

Note that virtualenv/venv will use the python3 found in PATH, so if you
only have python 3.5 you will still not be able to install kallithea.
If you can install python 3 6 or later in another way, you can make sure to
call that python executable instead of 'python3', e.g

python3.6 -m venv ../kallithea-venv

There exist ways to install a specific python version as a normal user,
e.g. with pyenv (https://github.com/pyenv/pyenv) or other similar tools.
You could also install a python version from source manually.

Best regards,
Thomas
___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


how to install kallithea from source

2020-08-13 Thread Uwe Brauer

Hi 

Since I cannot install kallitea via pip (my python version in Ubuntu
16.04 is too old) I thought to give the installation from source a try.


The documentation in 
https://kallithea.readthedocs.io/en/stable/installation.html

Reads

,
| hg clone https://kallithea-scm.org/repos/kallithea -u stable
| cd kallithea
| python3 -m venv ../kallithea-venv
| . ../kallithea-venv/bin/activate
| pip install --upgrade pip setuptools
| pip install --upgrade -e .
| python3 setup.py compile_catalog   # for translation of the UI
`

I don't understand the lines

 python3 -m venv ../kallithea-venv
 . ../kallithea-venv/bin/activate

Is this supposed to be one line?
What does the . At the beginning of the second line supposed to be?

Regards

Uwe Brauer 

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general