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

fix setup-web2py-ubuntu.sh and setup-web2py-debian.sh #2063

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sugizo
Copy link
Contributor

@sugizo sugizo commented Dec 8, 2018

ubuntu add package sudo as it's prerequisites to run from user
debian same like ubuntu script
all tested on docker and work

ref
https://groups.google.com/forum/#!topic/web2py/IFasLOdWsbI

@codecov-io
Copy link

codecov-io commented Dec 8, 2018

Codecov Report

Merging #2063 into master will increase coverage by 4.93%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2063      +/-   ##
==========================================
+ Coverage   49.33%   54.26%   +4.93%     
==========================================
  Files          44       43       -1     
  Lines       15923    17871    +1948     
  Branches     3771     4239     +468     
==========================================
+ Hits         7855     9698    +1843     
+ Misses       6957     6920      -37     
- Partials     1111     1253     +142

Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

Can we upgrade the Python version to Python 3? Python 2.5 has long since reached its end of life, and even 2.7 is nearing its own EOL in less than 365 days.

scripts/setup-web2py-debian.sh Outdated Show resolved Hide resolved
scripts/setup-web2py-debian.sh Outdated Show resolved Hide resolved
scripts/setup-web2py-debian.sh Outdated Show resolved Hide resolved
scripts/setup-web2py-debian.sh Outdated Show resolved Hide resolved
apt-get -y install ssh
apt-get -y install zip unzip
apt-get -y install tar
apt-get -y install openssh-server
apt-get -y install build-essential
apt-get -y install python
#apt-get -y install python2.5
apt-get -y install ipython
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
apt-get -y install ipython
apt-get -y install ipython3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

never tried web3py with ipython3, had someone tried it ?

@sugizo
Copy link
Contributor Author

sugizo commented Mar 5, 2019

agree, no worries to use python3 as a standard since python 2 EOL will be in 2020, perhaps update the others scripts (ubuntu, centos, fedora) too ?

@queengooborg
Copy link
Contributor

Definitely -- the more we can get upgraded to Python 3, the better support we'll have down the line!

queengooborg and others added 4 commits May 4, 2019 11:07
Co-Authored-By: sugizo <sugizo@users.noreply.github.com>
Co-Authored-By: sugizo <sugizo@users.noreply.github.com>
Co-Authored-By: sugizo <sugizo@users.noreply.github.com>
Co-Authored-By: sugizo <sugizo@users.noreply.github.com>
Copy link
Contributor

@mdipierro mdipierro left a comment

Choose a reason for hiding this comment

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

I do not think we want to default to python 3. Even if web2py works with py2 this breaks backward compatibility. For python3 we should encourage moving to web3py.

Require all granted
</Directory>

<Location /admin>
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure, should not removed that <Location /admin>, or it will thrown an error

apt-get -y install ipython
apt-get -y install python-dev
apt-get -y install postgresql
apt-get -y install apache2
apt-get -y install libapache2-mod-wsgi
apt-get -y install python-psycopg2
apt-get -y install python2.5-psycopg2
Copy link
Contributor

Choose a reason for hiding this comment

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

there is not pyhton2.7-psycopg2?

Copy link
Contributor Author

@sugizo sugizo May 27, 2019

Choose a reason for hiding this comment

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

last checked the package on 2019.05.27 on docker debian container

# apt search psycopg2
Sorting... Done
Full Text Search... Done
python-psycogreen/stable 1.0-1 all
  psycopg2 integration with coroutine libraries
python-psycopg2/stable 2.6.2-1 amd64
  Python module for PostgreSQL
python-psycopg2-dbg/stable 2.6.2-1 amd64
  Python module for PostgreSQL (debug extension)
python-psycopg2-doc/stable 2.6.2-1 all
  Python module for PostgreSQL (documentation package)

so it the package name should be : python-psycopg2
not python2.5-psycopg2 nor pyhton2.7-psycopg2

@@ -25,17 +25,20 @@ read CONFIRM
echo "installing useful packages"
echo "=========================="
apt-get update
apt-get -y install sudo
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this necessay?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it thrown an error when execute in docker container image because of minimal installed base system, think there is another option to cover the error, either get the user to installed sudo package first before execute the install script or put the sudo package on install scripts like the proposed change script
ref:
https://groups.google.com/forum/#!topic/web2py/IFasLOdWsbI

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

Successfully merging this pull request may close these issues.

None yet

4 participants