Skip to content

Commit

Permalink
Merge pull request #203 from jim-easterbrook/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
jim-easterbrook committed Jul 4, 2023
2 parents 2fa75d2 + 0e917c9 commit 4ae128b
Show file tree
Hide file tree
Showing 13 changed files with 1,056 additions and 175 deletions.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,19 @@ importer = ["gphoto2 >= 1.8; platform_system != 'Windows'"]
ipernity = ["photini[keyring,requests-toolbelt]"]
pixelfed = ["photini[keyring,requests-oauthlib,requests-toolbelt]"]
spelling = ["pyenchant >= 2.0"]
# install everything except the Qt package
all = ["""photini[keyring,requests-oauthlib,requests-toolbelt,\
importer,spelling,gpxpy,Pillow]"""]
# set versions of common packages
keyring = ["keyring >= 7.0"]
requests-oauthlib = ["requests-oauthlib >= 1.0"]
requests-toolbelt = ["requests-toolbelt >= 0.9"]
# the following are intended for use by the photini-configure script
PyQt5 = ["PyQt5 >= 5.9", "PyQtWebEngine >= 5.12"]
PyQt6 = ["PyQt6 >= 6.2", "PyQt6-WebEngine >= 6.2"]
PyQt6 = ["PyQt6 >= 6.2", "PyQt6-WebEngine >= 6.2",
"PyQt6-Qt6 < 6.3; python_version == '3.6.*'",
"PyQt6-WebEngine-Qt6 < 6.3; python_version == '3.6.*'"
]
PySide2 = ["PySide2 >= 5.11"]
PySide6 = ["PySide6 >= 6.2"]
gpxpy = ["gpxpy >= 1.3.5"]
Expand Down
55 changes: 45 additions & 10 deletions src/doc/other/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It is already installed on many computers, but on Windows you will probably need

You should also check what version of pip_ is installed::

jim@mint:~$ pip --version
jim@mint:~$ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Most Linux systems suppress pip's normal version check, but I recommend upgrading pip anyway::
Expand Down Expand Up @@ -64,7 +64,7 @@ It is already installed on many computers, but on Windows you will probably need
I suggest reading `Using Python on Windows`_ before you begin.
Go to https://www.python.org/downloads/windows/ and choose a suitable Python |nbsp| 3 installer.
Use the 64-bit stable release with the highest version number that will run on your version of Windows.
Beware of using very new releases though, as some dependencies may not have been updated to work with the latest Python.
Beware of using very new releases though, as some of Photini's dependencies may not have been updated to work with the latest Python.

When you run the Python installer make sure you select the "add Python to PATH" option.
If you customise your installation then make sure you still select "pip".
Expand Down Expand Up @@ -128,15 +128,24 @@ I use the name ``photini`` and create it in my home directory:
(photini) C:\Users\Jim>python -m pip install -U pip

Note that pip may need to be updated again from within the virtual environment.
The Linux/MacOS option ``--system-site-packages`` makes packages installed with the system package manager (e.g. PySide6 / PySide2 / PyQt6 / PyQt5) available within the virtual environment.
The Linux / MacOS option ``--system-site-packages`` makes packages installed with the system package manager (e.g. PySide6 / PySide2 / PyQt6 / PyQt5) available within the virtual environment.
You should stay in this virtual environment while installing and testing Photini.

Qt package
^^^^^^^^^^

Photini uses the Qt_ Framework for its graphical user interface.
There are two current versions of Qt (Qt5 and Qt6) and each has two Python interfaces (PyQt and PySide).
Hence there are four Python Qt packages - PyQt5, PyQt6, PySide2, and PySide6.
Photini works with any one of these, but there isn't one of them that works on all platforms.
For example, Qt6 does not work on Windows versions earlier than Windows |nbsp| 10.

After installing Photini the ``photini-configure`` command can be used to choose a Qt package.
This allows you to try each until you find one that works satisfactorily on your computer.

Initial installation
^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 2022.9.0
The ``photini-configure`` post installation script can be used to install most dependencies and configure Photini to use them.

Firstly install Photini with pip_:

.. tabs::
Expand Down Expand Up @@ -186,6 +195,31 @@ Firstly install Photini with pip_:
Installing collected packages: exiv2, appdirs, urllib3, idna, charset-normalizer, certifi, cachetools, requests, photini
Successfully installed appdirs-1.4.4 cachetools-5.2.0 certifi-2022.9.24 charset-normalizer-2.1.1 exiv2-0.11.3 idna-3.4 photini-2022.9.0 requests-2.28.1 urllib3-1.26.12

Photini's optional dependencies can be included in the installation by listing them as "extras" in the pip command.
For example, if you want to be able to upload to Flickr and Ipernity:

.. tabs::
.. code-tab:: none Linux/MacOS

(photini) jim@mint:~$ pip3 install "photini[flickr,ipernity]"
.. code-tab:: none Windows

C:\Users\Jim>pip install photini[flickr,ipernity]

Note that the extras' names are not case-sensitive.

.. versionadded:: 2023.7.0
You can install all of Photini's optional dependencies by adding an ``all`` extra.
You can also install any of the Qt packages as extras:

.. tabs::
.. code-tab:: none Linux/MacOS

(photini) jim@mint:~$ pip3 install "photini[all,pyqt5,pyside6]"
.. code-tab:: none Windows

C:\Users\Jim>pip install photini[all,pyqt5,pyside6]

Now run the ``photini-configure`` command to choose which Qt package to use:

.. tabs::
Expand Down Expand Up @@ -268,7 +302,7 @@ These provide additional features, for example the Flickr uploader, that not all
Missing system packages
"""""""""""""""""""""""

On some Linux systems (e.g. Ubuntu, Debian, Mint) Photini may still not run if you've installed PySide2 or PySide6 with pip_ instead of the system's package manager.
On some Linux systems (e.g. Ubuntu, Debian, Mint) Photini may still not run if you've installed a Qt package with pip_ instead of the system's package manager.
In this case it may be worth doing a web search for the error messages you get.
For example, failing to load a Qt plugin (on Debian) can be cured by installing just one system package (``libxcb-xinerama0``) but the error message doesn't tell you that!

Expand Down Expand Up @@ -394,7 +428,7 @@ Linux & MacOS users can install it with the system package manager, but installi
Start menu / application menu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Although you can run Photini from a command shell, most users would probably prefer to use the start/application menu or a desktop icon.
Although you can run Photini from a command shell, most users would probably prefer to use the start / application menu or a desktop icon.
These can be installed with the ``photini-post-install`` command:

.. tabs::
Expand Down Expand Up @@ -430,7 +464,7 @@ If you have installed Photini in a virtual environment then other users should b

C:\Users\Sarah>..\Jim\photini\Scripts\photini.exe

This is not a very convenient way to run Photini, so most users will want to add it to their start/application menu:
This is not a very convenient way to run Photini, so most users will want to add it to their start / application menu:

.. tabs::
.. code-tab:: none Linux/MacOS
Expand Down Expand Up @@ -476,7 +510,7 @@ It is important to use the full path to the post install command:
Uninstalling Photini
^^^^^^^^^^^^^^^^^^^^

Before removing Photini you should use the ``photini-post-install`` command to remove it from the start/application menu:
Before removing Photini you should use the ``photini-post-install`` command to remove it from the start / application menu:

.. tabs::
.. code-tab:: none Linux/MacOS
Expand Down Expand Up @@ -762,6 +796,7 @@ Open ``doc/html/index.html`` with a web browser to read the local documentation.
.. _PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/
.. _PySide2: https://pypi.org/project/PySide2/
.. _PySide6: https://pypi.org/project/PySide6/
.. _Qt: https://wiki.qt.io/About_Qt
.. _QtWebEngine: https://wiki.qt.io/QtWebEngine
.. _requests: http://python-requests.org/
.. _requests-oauthlib: https://requests-oauthlib.readthedocs.io/
Expand Down
128 changes: 113 additions & 15 deletions src/lang/ca/LC_MESSAGES/documentation.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Photini 2023.4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-21 10:47+0100\n"
"POT-Creation-Date: 2023-07-04 13:23+0100\n"
"PO-Revision-Date: 2023-04-19 08:54+0000\n"
"Last-Translator: Joan <[email protected]>, 2023\n"
"Language: ca\n"
Expand Down Expand Up @@ -2471,8 +2471,8 @@ msgid ""
"https://www.python.org/downloads/windows/ and choose a suitable Python "
"|nbsp| 3 installer. Use the 64-bit stable release with the highest version "
"number that will run on your version of Windows. Beware of using very new "
"releases though, as some dependencies may not have been updated to work with"
" the latest Python."
"releases though, as some of Photini's dependencies may not have been updated"
" to work with the latest Python."
msgstr ""

msgid ""
Expand Down Expand Up @@ -2528,23 +2528,50 @@ msgstr ""

msgid ""
"Note that pip may need to be updated again from within the virtual "
"environment. The Linux/MacOS option ``--system-site-packages`` makes "
"environment. The Linux / MacOS option ``--system-site-packages`` makes "
"packages installed with the system package manager (e.g. PySide6 / PySide2 /"
" PyQt6 / PyQt5) available within the virtual environment. You should stay in"
" this virtual environment while installing and testing Photini."
msgstr ""

msgid "Initial installation"
msgid "Qt package"
msgstr ""

msgid ""
"The ``photini-configure`` post installation script can be used to install "
"most dependencies and configure Photini to use them."
"Photini uses the Qt_ Framework for its graphical user interface. There are "
"two current versions of Qt (Qt5 and Qt6) and each has two Python interfaces "
"(PyQt and PySide). Hence there are four Python Qt packages - PyQt5, PyQt6, "
"PySide2, and PySide6. Photini works with any one of these, but there isn't "
"one of them that works on all platforms. For example, Qt6 does not work on "
"Windows versions earlier than Windows |nbsp| 10."
msgstr ""

msgid ""
"After installing Photini the ``photini-configure`` command can be used to "
"choose a Qt package. This allows you to try each until you find one that "
"works satisfactorily on your computer."
msgstr ""

msgid "Initial installation"
msgstr ""

msgid "Firstly install Photini with pip_:"
msgstr ""

msgid ""
"Photini's optional dependencies can be included in the installation by "
"listing them as \"extras\" in the pip command. For example, if you want to "
"be able to upload to Flickr and Ipernity:"
msgstr ""

msgid "Note that the extras' names are not case-sensitive."
msgstr ""

msgid ""
"You can install all of Photini's optional dependencies by adding an ``all`` "
"extra. You can also install any of the Qt packages as extras:"
msgstr ""

msgid "Now run the ``photini-configure`` command to choose which Qt package to use:"
msgstr ""

Expand All @@ -2570,11 +2597,11 @@ msgstr ""

msgid ""
"On some Linux systems (e.g. Ubuntu, Debian, Mint) Photini may still not run "
"if you've installed PySide2 or PySide6 with pip_ instead of the system's "
"package manager. In this case it may be worth doing a web search for the "
"error messages you get. For example, failing to load a Qt plugin (on Debian)"
" can be cured by installing just one system package (``libxcb-xinerama0``) "
"but the error message doesn't tell you that!"
"if you've installed a Qt package with pip_ instead of the system's package "
"manager. In this case it may be worth doing a web search for the error "
"messages you get. For example, failing to load a Qt plugin (on Debian) can "
"be cured by installing just one system package (``libxcb-xinerama0``) but "
"the error message doesn't tell you that!"
msgstr ""

msgid "Optional dependencies"
Expand Down Expand Up @@ -2602,7 +2629,7 @@ msgstr ""

msgid ""
"Although you can run Photini from a command shell, most users would probably"
" prefer to use the start/application menu or a desktop icon. These can be "
" prefer to use the start / application menu or a desktop icon. These can be "
"installed with the ``photini-post-install`` command:"
msgstr ""

Expand All @@ -2618,7 +2645,7 @@ msgstr ""

msgid ""
"This is not a very convenient way to run Photini, so most users will want to"
" add it to their start/application menu:"
" add it to their start / application menu:"
msgstr ""

msgid ""
Expand All @@ -2632,7 +2659,7 @@ msgstr ""

msgid ""
"Before removing Photini you should use the ``photini-post-install`` command "
"to remove it from the start/application menu:"
"to remove it from the start / application menu:"
msgstr ""

msgid ""
Expand Down Expand Up @@ -3864,3 +3891,74 @@ msgstr ""
#~ "to the map as usual."
#~ msgstr ""

#~ msgid ""
#~ "I suggest reading `Using Python on "
#~ "Windows`_ before you begin. Go to "
#~ "https://www.python.org/downloads/windows/ and choose a"
#~ " suitable Python |nbsp| 3 installer. Use"
#~ " the 64-bit stable release with the "
#~ "highest version number that will run "
#~ "on your version of Windows. Beware of"
#~ " using very new releases though, as "
#~ "some dependencies may not have been "
#~ "updated to work with the latest "
#~ "Python."
#~ msgstr ""

#~ msgid ""
#~ "Note that pip may need to be "
#~ "updated again from within the virtual "
#~ "environment. The Linux/MacOS option "
#~ "``--system-site-packages`` makes packages "
#~ "installed with the system package manager"
#~ " (e.g. PySide6 / PySide2 / PyQt6 /"
#~ " PyQt5) available within the virtual "
#~ "environment. You should stay in this "
#~ "virtual environment while installing and "
#~ "testing Photini."
#~ msgstr ""

#~ msgid ""
#~ "The ``photini-configure`` post installation "
#~ "script can be used to install most"
#~ " dependencies and configure Photini to "
#~ "use them."
#~ msgstr ""

#~ msgid ""
#~ "On some Linux systems (e.g. Ubuntu, "
#~ "Debian, Mint) Photini may still not "
#~ "run if you've installed PySide2 or "
#~ "PySide6 with pip_ instead of the "
#~ "system's package manager. In this case "
#~ "it may be worth doing a web "
#~ "search for the error messages you "
#~ "get. For example, failing to load a"
#~ " Qt plugin (on Debian) can be "
#~ "cured by installing just one system "
#~ "package (``libxcb-xinerama0``) but the "
#~ "error message doesn't tell you that!"
#~ msgstr ""

#~ msgid ""
#~ "Although you can run Photini from a"
#~ " command shell, most users would "
#~ "probably prefer to use the "
#~ "start/application menu or a desktop icon."
#~ " These can be installed with the "
#~ "``photini-post-install`` command:"
#~ msgstr ""

#~ msgid ""
#~ "This is not a very convenient way "
#~ "to run Photini, so most users will"
#~ " want to add it to their "
#~ "start/application menu:"
#~ msgstr ""

#~ msgid ""
#~ "Before removing Photini you should use "
#~ "the ``photini-post-install`` command to "
#~ "remove it from the start/application menu:"
#~ msgstr ""

Loading

0 comments on commit 4ae128b

Please sign in to comment.