Board index FlightGear Development

Announcing FFGo: a new FlightGear launcher

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Thu Jan 21, 2016 4:15 am

Exactly.
Thanks!
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Thu Jan 21, 2016 12:01 pm

OK, I have uploaded test version 1.9.1.dev1:
  • Installing it on Windows should create an ffgo-noconsole.exe executable (typically in C:\PythonXX\Scripts) that doesn't open any terminal window (“console”) when run. Does it work for you? Of course, in the hopefully rare cases where FFGo wouldn't start, you would have to look at the log file, and in case it couldn't even be written, run ffgo.exe to see the terminal output.
  • This version also has a Test stuff entry in the Tools menu. When you select it, you should see a window displaying messages containing Unicode characters, some of which are not in the CP-1252 character set you reported yesterday. I think this should work because it is printed in a non-console window. Of course you need to have fonts installed that can display these characters (Simplified Chinese and a few mathematical characters).

    Unfortunately, this doesn't really go through the normal translation process, because the output you posted yesterday seems to indicate that gettext.py doesn't consider your en_GB.cp1252 locale to be compatible with the English UTF-8 “translation”. In your case, English is used as a fallback, not because your locale starts with "en"... So, I don't think it would work for someone using a non-English locale in this encoding (they would get English). But CP-1252 is a legacy Windows thing, so...
Thanks for your reports!
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Thu Jan 21, 2016 12:28 pm

Hello,

I am pleased to announce the release of FFGo 1.9.0. The main changes in this release are:
  • Use the new airport chooser (widgets.AirportChooser) for the airport list in the main window. The airport list in the main window used to be a simple list; replace it with a real multicolumn widget (Ttk Treeview), reusing the logic already implemented in widgets.AirportChooser. This fixes small alignment problems in the previous implementation (due to the ICAO codes not having the same display width), allows one to sort the airport list by ICAO code or airport name, in ascending or descending order, with a simple click on the relevant column header, and brings the nice logic from widgets.AirportChooser to the main window airport list (such as preferring an exact match on ICAO code when there are also substring matches on airport names for a given search string).

    The airport chooser has also been modified to better handle navigation keys (Up and Down arrows, Page Up and Page Down, Home and End). Most notably, holding down one of the first four mentioned here should work as expected (this might need some tuning, because the thing is to delay the time-consuming task of updating everything that depends on the selected airport enough so that Tk has sufficient time between two consecutive “arrow-pressed” keyboard events to refresh the GUI---please report if that doesn't work for you in an airport list [the aircraft list still has this little problem when an arrow key is held down, I know]).
  • New GPS Tool dialog (cf. screenshot below) allowing one to find the distance, initial and final bearings for the shortest path between two given airports. This dialog should be more convenient than the Airport Finder dialog for the cases where you already know the start and destination airports you are interested in, and you just want to get the results for these airports. Or you want to check several pairs of airports, and you know precisely which ones you want the calculations to be done for.

    The dialog also computes the flight duration for a given ground speed, and vice versa. It reuses the AirportChooser widget already used in FFGo's main window and in the Airport Finder dialog.
  • New setting: “Automatically scroll the Output Window”. Add a checkbox to the Miscellaneous tab of the Preferences dialog to control whether FFGo should automatically scroll the FlightGear Output Window to the end whenever new text is received from FlightGear's stdout or stderr stream. This corresponds to the config file parameter AUTOSCROLL_FG_OUTPUT. (feature request by pommesschranke/d-laser)
  • Add option to translate --parkpos into --lat, --lon and --heading. This option can be enabled using the “Fake the --parkpos option” checkbox found in the Miscellaneous tab of the Preferences dialog. It is useful when --parkpos is broken in FlightGear (which is currently the case in the 'next' branch of FlightGear's Git repository).
  • Fix bug preventing FFGo from starting when there was no translation file for the current locale (thanks to legoboyvdlp for the report).
  • Add missing 'tkinter.messagebox' import for 'showerror' in ffgo/fgdata/parking.py. The problematic code could only be reached when FFGo opens an erroneous groundnet file. Problem was: the error reporting could not be done properly.
  • Fix two options from the Preferences dialog whose lastest-updated values were used by FFGo even if the dialog was closed with Cancel. These are the 'Remember the main window position' and 'Automatically scroll the Output Window' options.
  • Airport Finder: display an explanatory error message when the user chooses an airport that is not present in FFGo's main window due to the fact that the “Show installed airports only” option (from the Settings menu) has been enabled.
  • Hide item-specific tooltips when the underlying List or Treeview is scrolled. Once a list or Treeview is scrolled, item-specific tooltips are likely not to match the item under the mouse pointer anymore. For this reason, hide the item-specific tooltip whenever each of the following Lists or Treeviews is scrolled: aircraft and airport lists in FFGo's main window; “reference airport” chooser and results table in the Airport Finder dialog (the GPS Tool dialog has never had this little problem AFAICT).
  • Main window: set the initial focus in the airport search entry. I think this is the most useful thing to do in general.
  • Add a colored, disabled (i.e., not clickable) and empty header to the carrier popup menu. This makes it more visible, visually similar to the runway and parking popup menus, and avoids it disappearing in a flash with the first entry being accidentally selected (i.e., 'carrier = None', return to airport mode) if the user just clicked without holding the left mouse button down.
  • Update the German translation (thanks to chris_blues)
Screenshot of the new GPS Tool dialog:
Image
For those who don't know, there is also a screenshots gallery on FFGo's home page.

As usual, you can get this release from FFGo's home page. Debian packages for jessie and unstable are available from there, along with the distribution-agnostic tarballs and zip files.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Thu Jan 21, 2016 2:21 pm

Hmm, just wondering, it is white, instead of grey for me. Not a big deal, but it is a very bright white, and I find it hard to read things, not to mention eye strain.
Last edited by legoboyvdlp on Thu Jan 21, 2016 4:34 pm, edited 1 time in total.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Thu Jan 21, 2016 3:40 pm

Sorry, I don't follow you. What is white, and what do you mean with "md"?
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Thu Jan 21, 2016 4:35 pm

Er, nevermind. That's what comes of messing with Intel settings too much. I had to reduce Gamma in my driver settings.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Fri Jan 22, 2016 1:27 pm

So, legoboyvdlp, could you try what I mentioned in http://forum.flightgear.org/viewtopic.php?f=18&t=27054&p=273634#p273605, in particular the ffgo-noconsole.exe executable? Thanks.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Fri Jan 22, 2016 2:28 pm

Certainly! I'll report shortly.
That's two things this morning... at this rate it will be 3 soon.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Fri Jan 22, 2016 2:30 pm

All works fine :)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Fri Jan 22, 2016 4:44 pm

Good, thanks. There is still one minor thing that most likely doesn't work on Windows at the moment: it is the Open Log Directory button at the bottom right of FFGo's main window. In order to fix this little inconvenience, I need a working command line to do this. Can you please confirm that running:
Code: Select all
explorer.exe %APPDATA%/FFGo/Logs

in a terminal (obtained by running cmd.exe) opens the log directory? If not, maybe %APPDATA%/FFGo/Logs must be put inside double quotes. Or maybe one has to replace the slashes (/) with backslashes (\), but I don't think this one is necessary.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Fri Jan 22, 2016 5:08 pm

Sure! But I'm not certain that it won't need the full path to AppData, instead of the Variable; ie C:/Users/Username/AppData
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby legoboyvdlp » Fri Jan 22, 2016 5:22 pm

I have to report -- did not work.
It does not find explorer.exe...


The explorer.exe file is located in the C:\Windows folder apparently... have to try that

Yep, it worked in C:\Windows\, but it opened to Documents -- not %APPDATA%\Roaming\FFGo\Logs (correct path). Will try giving complete path


It worked!

The correct one is:

Code: Select all
C:\Windows>explorer.exe C:\Users\$Username\AppData\Roaming\FFGo\Logs\
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Fri Jan 22, 2016 10:45 pm

Hmm, I am very surprised by your results. %APPDATA% should be expanded in Windows “shells”, that is the syntax for variable expansions in this language as far as I know, and the Internet is full of examples of people doing just that, with screenshots. Moreover, I think you are confused by this (misleading) APPDATA: while the variable is supposed to expand to "C:\Documents and Settings\$USER\Application Data" on XP, on Vista and Win7 it is supposed to rather expand to "C:\Users\$USER\AppData\Roaming". Right, it is inside a folder named AppData (not "Application Data", BTW), but it is not a folder named AppData (cf. http://answers.microsoft.com/en-us/wind ... 8960423ce3 and http://superuser.com/questions/312136/h ... 952_312154 for instance).

Anyway, I uploaded version 1.9.1.dev2 which uses a different method (os.startfile()) that doesn't require to know the path to Explorer.exe and should not even start a new Explorer process if one already exists, according to what I read. I also added an OS X-specific code path that uses "open" instead of the "xdg-open" command used on other non-Windows systems, if someone wants to test there also.

Does it work for you? Thanks.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Announcing FFGo: a new FlightGear launcher

Postby chris_blues » Sun Jan 24, 2016 5:23 pm

Hi there!

I just decided, that I am too lazy and inexperienced with Python3 and pip and all that, so I'll switch to the debian repository. Now, all I'm missing is the key to verify the packages(key C785B90B5053A3A2). Apt is really annoyed! Where can I get it? Maybe a hint on the Homepage would be nice too...
Many ppa's provide their keys in a keyring deb-package inside their repo.

[dependencies problem resolved - my mistake]

This is, because FFGo or Python3 or whatever refuses tu build/update my copy of FFGo. So I thought, maybe I did sth stupid to my copy (No idea what I possibly could have done. Never touched this dir...)

Thanks,
chris


Outputs:
* update script
Code: Select all
##########################
####  Updating FFGo!  ####
##########################
Already up-to-date.
make -C share/icons
make[1]: Entering directory '/media/FG/ffgo/share/icons'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/media/FG/ffgo/share/icons'
make -C ffgo/data/pics
make[1]: Entering directory '/media/FG/ffgo/ffgo/data/pics'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/media/FG/ffgo/ffgo/data/pics'
make -C ffgo/data/locale update-mo
make[1]: Entering directory '/media/FG/ffgo/ffgo/data/locale'
make[1]: Nothing to be done for 'update-mo'.
make[1]: Leaving directory '/media/FG/ffgo/ffgo/data/locale'
Traceback (most recent call last):
  File "bin/pip", line 7, in <module>
    from pip import main
ImportError: No module named 'pip'


* Try to start FFGo:
Code: Select all
/media/FG/ffgo/bin/ffgo
Traceback (most recent call last):
  File "/media/FG/ffgo/bin/ffgo", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named 'pkg_resources'


* Try to update "by hand":
Code: Select all
pip install --upgrade --force-reinstall FFGo ./
Unpacking /media/FG/ffgo
  Running setup.py (path:/tmp/pip-JyYq5v-build/setup.py) egg_info for package from file:///media/FG/ffgo
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-JyYq5v-build/setup.py", line 23, in <module>
        with open(version_file, "r", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-JyYq5v-build/setup.py", line 23, in <module>

    with open(version_file, "r", encoding="utf-8") as f:

TypeError: 'encoding' is an invalid keyword argument for this function

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-JyYq5v-build
Storing debug log for failure in /home/chris/.pip/pip.log


* without the options:
Code: Select all
pip install FFGo ./
Unpacking /media/FG/ffgo
  Running setup.py (path:/tmp/pip-iAL1Fd-build/setup.py) egg_info for package from file:///media/FG/ffgo
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-iAL1Fd-build/setup.py", line 23, in <module>
        with open(version_file, "r", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-iAL1Fd-build/setup.py", line 23, in <module>

    with open(version_file, "r", encoding="utf-8") as f:

TypeError: 'encoding' is an invalid keyword argument for this function

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-iAL1Fd-build
Storing debug log for failure in /home/chris/.pip/pip.log


* ~/.pip/pip.log :
Code: Select all
------------------------------------------------------------
/usr/bin/pip run on Sun Jan 24 17:10:17 2016
Unpacking /media/FG/ffgo
  Running setup.py (path:/tmp/pip-iAL1Fd-build/setup.py) egg_info for package from file:///media/FG/ffgo
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-iAL1Fd-build/setup.py", line 23, in <module>
        with open(version_file, "r", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-iAL1Fd-build/setup.py", line 23, in <module>

    with open(version_file, "r", encoding="utf-8") as f:

TypeError: 'encoding' is an invalid keyword argument for this function

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-iAL1Fd-build
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 716, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-iAL1Fd-build
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Announcing FFGo: a new FlightGear launcher

Postby rominet » Mon Jan 25, 2016 1:35 am

Hi Chris,

I see you have deleted some parts of your first message. But since I had already written the corresponding replies, and they contain many details that I hope may be helpful to you or other people, I'll include them and reply to them anyway. I hope you don't mind.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:Hi there!

I just decided, that I am too lazy and inexperienced with Python3 and pip and all that, so I'll switch to the debian repository. Now, all I'm missing is the key to verify the packages(key C785B90B5053A3A2). Apt is really annoyed! Where can I get it? Maybe a hint on the Homepage would be nice too...


Right, I will add this info to the home page. Sorry. There are two main ways to get the key:
  1. The GnuPG way is
    Code: Select all
    gpg2 --recv-keys C785B90B5053A3A2
    gpg2 --list-keys --fingerprint C785B90B5053A3A2

    the output of which should show the correct fingerprint:
    Code: Select all
    pub   rsa4096/0xC785B90B5053A3A2 2010-03-17 [expires: 2016-10-19]
          Key fingerprint = 125B 5A0F DB78 8FDD 0EF4  1A9D C785 B90B 5053 A3A2

    Normally, in the GnuPG model, you would get the fingerprint by a really secure channel (e.g., meeting me in person) or you would rely on the "web of trust" (trusting someone who trusts someone who... who trusts this key actually belongs to me. The chain verification is automated by gpg using digital signatures, done with each participant's key). Then, in order to have they key in a separate file '~/tmp/flo-key':
    Code: Select all
    gpg2 --export -o ~/tmp/flo-key C785B90B5053A3A2
    (using ~/tmp/flo-key to avoid any symlink attack). But properly using gpg is out of scope here...
  2. The other way is getting the key via HTTPS from my home page at https://people.via.ecp.fr/~flo/OpenPGP-key.asc (linked from https://people.via.ecp.fr/~flo/keys.html). HTTPS uses TLS which is crap, but it is not worse than when you check your bank accounts online or purchase anything online, or download most programs without apt (which relies on gpg encryption).

    In short, to get the key, you can do:
    Code: Select all
    wget -O ~/tmp/flo-key https://people.via.ecp.fr/~flo/OpenPGP-key.asc
Once you have the key in the file 'flo-key', to install it for apt, you have to run, as root:
Code: Select all
apt-key add flo-key

One can even combine the two operations into a single command (getting the key and installing it into apt's keyring):
Code: Select all
wget -O- https://people.via.ecp.fr/~flo/OpenPGP-key.asc | apt-key add -

but this has to be done as root, which I don't like for wget. This can be overcome by using ssh, maybe also with sudo, but this is out of scope too.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:Many ppa's provide their keys in a keyring deb-package inside their repo.

How do you ensure the authenticity of this keyring package if you don't yet have the GPG key used to sign the repo's Release file? There is a chicken and egg problem here. If you just download the .deb manually, with http or ftp, this is vulnerable to man-in-the-middle attacks (MITM). GPG does not suffer from such flaws, but it is not a tool that anyone can master in 5 minutes. Good security practice is never easy.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:Additionally, FFGo doesn't require FlightGear to work. There a lot of unnecessary dependencies in there. Maybe you'd like to change that, so only necessary packages are being pulled along.

1) The ffgo package I provide does not Depend on flightgear:
Code: Select all
% dpkg -s ffgo
Package: ffgo

[...]

Version: 1.9.0-1~frougon+deb9
Depends: python3-condconfigparser, python3:any (>= 3.4~), libjs-sphinxdoc (>= 1.0), python3-pkg-resources, python3-tk
Recommends: flightgear (>= 2.0.0), python3-pil.imagetk, geographiclib-tools

You have to tell apt-get, aptitude or whatever you are using to install packages, that you want to install 'ffgo', ignoring the 'flightgear' recommendation.
Code: Select all
% man apt-get

[...]

       --no-install-recommends
           Do not consider recommended packages as a dependency for
           installing. Configuration Item: APT::Install-Recommends.

FFGo is practically useless without FlightGear, therefore Debian policy says the 'ffgo' package should Depend on, or at least Recommend, 'flightgear'. The only things that could be useful without FlightGear (distance and bearing calculations...) require access to the airport list, and thus to apt.dat.gz, which, in Debian context, is only provided by FlightGear packages AFAIK.

If you don't believe me, have a look at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806371. The absence of a dependency on dialog was reported as a grave bug (and Julien Cristau knows Debian pretty well) and fixed by adding a dependency on dialog. The situation is the same: one can very well compile dialog without installing the Debian package (and it is 10x easier than compiling FlightGear). But this is not how dependencies are used in Debian.

I understand your situation, though. Here, you are in the easy case because I have chosen Recommends. Otherwise, had I chosen to use a Depends relation, the normal way to solve your problem would be to create a dummy 'flightgear' package using 'equivs', like this.
Code: Select all
# apt-get install equivs

% cat >/tmp/flightgear-control <<EOF
Section: games
Priority: optional
Standards-Version: 3.9.6

Package: flightgear
Version: 2016.1.0+dummy
Maintainer: Your Name <yourname@example.com>
Description: dummy package pretending to be flightgear
 This package is empty. Install it if you want apt and dpkg to believe you
 have the flightgear Debian package installed.
 .
 Note that this package does *not* contain FlightGear!
EOF
% cd /tmp
/tmp % equivs-build flightgear-control

/tmp # dpkg -i flightgear_2016.1.0+dummy_all.deb   # installs the dummy pkg

After this, Debian tools will see a 'flightgear' package on your system, even if it doesn't contain any executable. And thus, dependencies on this package will be considered to be fulfilled.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:
Code: Select all
The following additional packages will be installed:
  flightgear flightgear-data-ai flightgear-data-aircrafts flightgear-data-all flightgear-data-base flightgear-data-models geographiclib-tools
  libgeographic14 libhtsengine1 libjs-excanvas libjs-jquery-flot libjs-leaflet libjs-sphinxdoc libsimgearcore3.4.0v5 libsimgearscene3.4.0v5
  python3-condconfigparser

The only really required package is python3* and python3-condconfigparser. all the others are maybe recommended, but not required. (Don't know about this libjs/jquery stuff... seems odd...

Most of the packages you are listing here are dependencies of one of the flightgear-* packages, which are not required but recommended. If you do:
Code: Select all
apt-get install --no-install-recommends ffgo

your list will be reduced to 'libjs-sphinxdoc python3-condconfigparser'. python3-condconfigparser is required to parse the contents of the Options Window and libjs-sphinxdoc is required to properly make use of the FFGo conditional config documentation that is installed locally as part of the ffgo package for those who don't have Internet access. This documentation has a Search function that is implemented in JavaScript (not by me, but by Sphinx, which is the standard Python documentation system and which I used to write this doc).

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:This is, because FFGo or Python3 or whatever refuses tu build/update my copy of FFGo. So I thought, maybe I did sth stupid to my copy (No idea what I possibly could have done. Never touched this dir...)

As I wrote in my mail, you have mixed up pip and Git in a strange way and used pip in a way I never advised. I'll include two sample install sessions at the end of this message, one using FFGo from Git, and the other using pip to install both FFGo and CondConfigParser.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:Outputs:
* update script
Code: Select all
##########################
####  Updating FFGo!  ####
##########################
Already up-to-date.
make -C share/icons
make[1]: Entering directory '/media/FG/ffgo/share/icons'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/media/FG/ffgo/share/icons'
make -C ffgo/data/pics
make[1]: Entering directory '/media/FG/ffgo/ffgo/data/pics'
make[1]: Nothing to be done for 'default'.
make[1]: Leaving directory '/media/FG/ffgo/ffgo/data/pics'
make -C ffgo/data/locale update-mo
make[1]: Entering directory '/media/FG/ffgo/ffgo/data/locale'
make[1]: Nothing to be done for 'update-mo'.
make[1]: Leaving directory '/media/FG/ffgo/ffgo/data/locale'
Traceback (most recent call last):
  File "bin/pip", line 7, in <module>
    from pip import main
ImportError: No module named 'pip'


This comes from your own script, which does:
Code: Select all
cd ../ffgo
git pull
make
bin/pip install --upgrade --force-reinstall FFGo ./

(skipping the beginning and removing the commented out line)
This is obviously messy. You are using bin/pip from FFGo's Git repo root directory, but this repository does *not* contain any such file! If you have bin/pip here, it probably means you have created a virtual environment in the same directory as FFGo's Git repository, this is absolutely not supported. Git must be complaining a lot about untracked files. pip used from there may overwrite files from FFGo or the other way around. You just can't expect things to work this way.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:* Try to start FFGo:
Code: Select all
/media/FG/ffgo/bin/ffgo
Traceback (most recent call last):
  File "/media/FG/ffgo/bin/ffgo", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named 'pkg_resources'


'pkg_resources' is only needed when running the ffgo executable created by 'pip install ffgo'. When using the ffgo-launcher.py script located at the root of every FFGo distribution tarball, zip file or Git repository, this module is not needed. But I never told anyone to use pip directly from a Linux distribution.

Unless using special options (--user) which don't work well in my experience, you shouldn't have the required permissions on Debian to do 'pip install something' unless you are root. But I have warned in bold in FFGo's README.rst file, which is rendered as HTML at https://pypi.python.org/pypi/FFGo as well as below the file listing on FFGo's GitHub page, to not run this command as the superuser (cf. the Installation section).

That is why I have spent days explaining virtual environments in docs/INSTALL/INSTALL_en, because short of using a Python interpreter that is clearly distinct from your system Python (= one shipped by your Linux distro)---for instance by compiling Python yourself in your home directory, or by using an OS such as Windows that has no system Python---virtual environments are the only way I know to use pip in a manner that doesn't lead to problems. I could tell you to install the Debian python3-pkg-resources, but that would be only adressing a symptom:
  • if you installed FFGo with a proper pip setup, as explained in great detail in INSTALL_en, then this pip, not /usr/bin/pip, must give the ffgo executable it created access to the 'pkg_resources' module, because this module is part of setuptools, and setuptools is a hard dependency of pip.

    If you installed using any of the recommended ways of using pip in INSTALL_en, I don't think pkg_resources can be missing when invoking the ffgo executable installed by the proper pip (i.e., either in a virtual environment, or in a Python installation that is not shipped by your operating system tools [apt/dpkg/rpm/etc.]).
  • otherwise, you shouldn't have any ffgo executable (because it is created by the 'pip install' step), and the only supported way in this case is to use the ffgo-launcher.py script that comes with FFGo.

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:* Try to update "by hand":
Code: Select all
pip install --upgrade --force-reinstall FFGo ./
Unpacking /media/FG/ffgo
  Running setup.py (path:/tmp/pip-JyYq5v-build/setup.py) egg_info for package from file:///media/FG/ffgo
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-JyYq5v-build/setup.py", line 23, in <module>
        with open(version_file, "r", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-JyYq5v-build/setup.py", line 23, in <module>

    with open(version_file, "r", encoding="utf-8") as f:

TypeError: 'encoding' is an invalid keyword argument for this function


This shows that this is run by Python 2.x, no wonder it doesn't work. You are using a pip executable that runs Python 2.x, presumably the one from Debian's python-pip package. This is not a supported configuration. Debian Python developers will tell you that you are on your own if this breaks your Python installation (which can't happen unless you do it with root privileges, which I very strongly advised against in the documentation). I already enumerated the supported pip setups:
  • pip executable from a non-system Python (not installed via your distro package manager); for instance, compiled Python in your home directory; or, Python installation on Windows---clearly not part of Windows;
  • pip executable from a Python virtual environment; to invoke such an executable, you have to either specify its path on the command line, or use an alias, or modify your PATH (or use the 'activate' trick which just modifies your PATH until you do 'deactivate'---as explained in INSTALL_en).
Moreover, the pip syntax you used in:
Code: Select all
pip install --upgrade --force-reinstall FFGo ./

doesn't correspond to anything I have written. I never advised to use --force-reinstall, and I never advised to add the './' at the end. pip does not work like cp. You pass a list of packages to install, or a list of URLs to packages, but certainly not the destination directory simply as the last argument. Where did you get this idea? The destination directories are determined by the particular pip executable you use. i.e.
Code: Select all
/foo/bar/bin/pip install pkg1 pkg2 ... pkgn

is going to install pkg1, pkg2, ... pkgn under /foo/bar/bin and /foo/bar/lib/python3.4/site-packages (assuming the venv in /foo/bar was created from a Python 3.4 installation). This is why using /usr/bin/pip as root is a recipe for disaster, since it should normally create or overwrite files under /usr/bin and /usr/lib/python3.4/site-packages, which is the realm of the package manager (dpkg on Debian). Debian developers were so afraid/annoyed by user reports because of this misuse of pip, that IIRC they have modified the Debian-shipped pip to print a big fat warning in such a case, maybe also install under /usr/local (it depends on which period you consider---there have been several discussions about that on the debian-python mailing list).

In short, pip does not work like 'pip install <package> <destdir>'!

chris_blues wrote in Sun Jan 24, 2016 5:23 pm:* without the options:
Code: Select all
pip install FFGo ./
Unpacking /media/FG/ffgo
  Running setup.py (path:/tmp/pip-iAL1Fd-build/setup.py) egg_info for package from file:///media/FG/ffgo
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-iAL1Fd-build/setup.py", line 23, in <module>
        with open(version_file, "r", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function


[...]


Same problem. This was run by Python 2.

As promised, two sample installation sessions on Linux:
  1. Installing FFGo (and CondConfigParser) using pip in a virtual environment:
    First, as root:
    Code: Select all
    # Mandatory
    apt-get install python3 python3-tk python3-venv

    # Optional; may help if you want to compile Pillow
    apt-get install libpython3-dev tcl-dev tk-dev

    # Optional: to have magnetic headings and magnetic declination
    apt-get install geographiclib-tools
    /usr/sbin/geographiclib-get-magnetic minimal
    # Highly optional, for better precision (no idea if one can see the
    # difference for typical aviation needs):
    /usr/sbin/geographiclib-get-magnetic emm2015

    Then, as an unprivileged user:
    Code: Select all
    ~ % mkdir ~/my-venvs
    ~ % cd ~/my-venvs/
    # You may want to use '/usr/bin/pyvenv-3.4' or '/usr/bin/python3.4
    # -m venv' instead of '/usr/bin/pyvenv' to make sure which Python
    # version you are working with. It is *very* important that you are
    # clear about that. Of course, it must correspond to the packages
    # you installed above.
    ~/my-venvs % /usr/bin/pyvenv-3.4 venv1
    ~/my-venvs % ls my-venv1
    bin  include  lib  lib64  pyvenv.cfg

    # Install FFGo in this venv using the pip executable **_from this venv_**
    ~/my-venvs % venv1/bin/pip install ffgo
    Downloading/unpacking ffgo
      Downloading FFGo-1.9.0.tar.gz (767kB): 767kB downloaded
      Running setup.py (path:/tmp/pip-build-phq2qtge/ffgo/setup.py) egg_info for package ffgo

    [...]

    Downloading/unpacking CondConfigParser (from ffgo)
      Downloading CondConfigParser-1.0.2.tar.bz2 (46kB): 46kB downloaded
      Running setup.py (path:/tmp/pip-build-phq2qtge/CondConfigParser/setup.py) egg_info for package CondConfigParser

    [...]

    Installing collected packages: ffgo, CondConfigParser
      Running setup.py install for ffgo

    [...]

    Successfully installed ffgo CondConfigParser
    Cleaning up...
    ~/my-venvs % venv1/bin/ffgo
    FFGo 1.9.0 started
    Using:
      - Python 3.4.4
      - CondConfigParser 1.0.2
      - MagneticField: GeographicLib version 1.45

    [FFGo warning] Pillow library not found. Aircraft thumbnails won't be
    displayed.
    [FFGo notice] GeographicLib's Python binding not found. FFGo has fallback
    strategies, therefore you shouldn't see much of a difference. However, some
    particular geodetic calculations can only be done with GeographicLib. You will
    be notified when such a case is encountered.
    Detected FlightGear version: 2016.1.0

    # FFGo works. It just told us about the two optional dependencies we
    # haven't installed. Let's install them. There is another way that
    # uses Debian packages (creating the venv with
    # --system-site-packages), this is explained in INSTALL_en, I can't
    # replicate all of its contents here.
    ~/my-venvs % venv1/bin/pip install Pillow geographiclib
    Downloading/unpacking Pillow
      Downloading Pillow-3.1.0.tar.gz (9.9MB): 9.9MB downloaded

    [...]

    Installing collected packages: Pillow, geographiclib
      Running setup.py install for Pillow

        warning: no previously-included files found matching '.editorconfig'
        building 'PIL._imaging' extension

    [...]

    Cleaning up...

    # Let's start FFGo again
    ~/my-venvs % venv1/bin/ffgo
    FFGo 1.9.0 started
    Using:
      - Python 3.4.4
      - CondConfigParser 1.0.2
      - GeographicLib's Python binding 1.45
      - MagneticField: GeographicLib version 1.45

    Detected FlightGear version: 2016.1.0
    ~/my-venvs %
    # No warning anymore: all optional deps are installed for
    # ~/my-venvs/venv1/bin/ffgo.
  2. Installing CondConfigParser using pip in a venv, while using FFGo directly
    from a clone of its Git repository:
    Code: Select all
    ~ % cd ~/my-venvs
    # Create a virtual environment
    ~/my-venvs % /usr/bin/pyvenv-3.4 venv2
    # Install CondConfigParser in this venv using the pip executable
    # **_from this venv_**
    ~/my-venvs % venv2/bin/pip install CondConfigParser
    Downloading/unpacking CondConfigParser
      Downloading CondConfigParser-1.0.2.tar.bz2 (46kB): 46kB downloaded
      Running setup.py (path:/tmp/pip-build-gdlz9yez/CondConfigParser/setup.py)

    [...]

    Successfully installed CondConfigParser
    Cleaning up...
    ~ % mkdir ~/src
    ~ % cd ~/src

    # Clone FFGo's Git repository
    ~/src % git clone https://github.com/frougon/FFGo.git ffgo.git
    Cloning into 'ffgo.git'...
    remote: Counting objects: 3001, done.       
    remote: Total 3001 (delta 0), reused 0 (delta 0), pack-reused 3001       
    Receiving objects: 100% (3001/3001), 1.39 MiB | 940.00 KiB/s, done.
    Resolving deltas: 100% (1927/1927), done.
    Checking connectivity... done.

    ~/src % cd ffgo.git

    # This must be done whenever you work with FFGo's Git repo (unless
    # you know what you are doing), after 'git clone' and every 'git
    # pull' to have exisiting and up-to-date icons and translation (.mo)
    # files. This requires installing stuff indicated in
    # INSTALL_en's “Installation from the Git repository” section.
    ~/src/ffgo.git % make
    make -C share/icons
    make[1]: Entering directory '/home/flo/src/ffgo.git/share/icons'

    [...]

    make[1]: Leaving directory '/home/flo/src/ffgo.git/ffgo/data/locale'

    # Since FFGo was not installed with pip in this case, no 'ffgo'
    # executable has been created. The recommended way to run FFGo in
    # such a case is via the ffgo-launcher.py script. The full path to
    # ffgo-launcher.py is not needed here since it is in the current
    # directory, however if you create an alias for this command, or if
    # you configure an icon in your menu bar/whatever to run it, you
    # will need the path (and maybe '/home/username' instead of '~'
    # too). The path to the Python interpreter, however
    # (~/my-venvs/venv2/bin/python), is crucial since it is for *this*
    # Python interpreter that we have installed CondConfigParser.
    ~/src/ffgo.git % ~/my-venvs/venv2/bin/python ~/src/ffgo.git/ffgo-launcher.py
    FFGo 1.9.0 started
    Using:
      - Python 3.4.4
      - CondConfigParser 1.0.2
      - MagneticField: GeographicLib version 1.45

    [FFGo warning] Pillow library not found. Aircraft thumbnails won't be
    displayed.
    [FFGo notice] GeographicLib's Python binding not found. FFGo has fallback
    strategies, therefore you shouldn't see much of a difference. However, some
    particular geodetic calculations can only be done with GeographicLib. You will
    be notified when such a case is encountered.
    Detected FlightGear version: 2016.1.0
    ~/src/ffgo.git %

    # Again, FFGo works fine and just warns us about the two optional
    # dependencies it couldn't find. They can be installed in exactly
    # the same way as above by substituting 'venv2' for 'venv1'.

Now, how to update in each case:
  • First case: both FFGo and CondConfigParser were installed in the venv
    under ~/my-venvs/venv1 using pip **_from this venv_**:
    Code: Select all
    # Examine what is installed in ~/my-venvs/venv1
    % ~/my-venvs/venv1/bin/pip list
    CondConfigParser (1.0.2)
    FFGo (1.9.0)
    geographiclib (1.45)
    Pillow (3.1.0)
    pip (1.5.6)
    setuptools (18.8)

    # Now, let's see what can be updated
    % ~/my-venvs/venv1/bin/pip list --outdated
    setuptools (Current: 18.8 Latest: 19.5)
    pip (Current: 1.5.6 Latest: 8.0.2)

    # Only 'setuptools' and 'pip' are out-of-date in this venv, let's upgrade them:
    % ~/my-venvs/venv1/bin/pip install --upgrade setuptools pip
    Downloading/unpacking setuptools from https://pypi.python.org/packages/3.5/s/setuptools/setuptools-19.5-py2.py3-none-any.whl#md5=c44407cb10f9b231f5a05908dea1a803
      Downloading setuptools-19.5-py2.py3-none-any.whl (471kB): 471kB downloaded
    Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-8.0.2-py2.py3-none-any.whl#md5=2056f553d5b593d3a970296f229c1b79
      Downloading pip-8.0.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded

    [...]

    Successfully installed setuptools pip
    Cleaning up...
    %
  • Second case: CondConfigParser was installed in the ~/my-venvs/venv2 virtual environment, but FFGo is used directly from a clone of its Git repository:
    Code: Select all
    # For what is installed in the venv, it is the same as in the first
    # case.
    % ~/my-venvs/venv2/bin/pip list --outdated
    setuptools (Current: 18.8 Latest: 19.5)
    pip (Current: 1.5.6 Latest: 8.0.2)

    # Again, the same two packages need an update; all others are at
    # their latest upstream stable version.
    % ~/my-venvs/venv2/bin/pip install --upgrade setuptools pip
    Downloading/unpacking setuptools from https://pypi.python.org/packages/3.5/s/setuptools/setuptools-19.5-py2.py3-none-any.whl#md5=c44407cb10f9b231f5a05908dea1a803

    [...]

    Successfully installed setuptools pip
    Cleaning up...

    # FFGo was not installed via pip in the venv. We use the Git repo for FFGo:
    % cd ~/src/ffgo.git
    ~/src/ffgo.git % git pull
    Already up-to-date.
    ~/src/ffgo.git % make
    make -C share/icons
    make[1]: Entering directory '/home/flo/src/ffgo.git/share/icons'
    make[1]: Nothing to be done for 'all'.
    make[1]: Leaving directory '/home/flo/src/ffgo.git/share/icons'
    make -C ffgo/data/pics
    make[1]: Entering directory '/home/flo/src/ffgo.git/ffgo/data/pics'
    make[1]: Nothing to be done for 'default'.
    make[1]: Leaving directory '/home/flo/src/ffgo.git/ffgo/data/pics'
    make -C ffgo/data/locale update-mo
    make[1]: Entering directory '/home/flo/src/ffgo.git/ffgo/data/locale'
    make[1]: Nothing to be done for 'update-mo'.
    make[1]: Leaving directory '/home/flo/src/ffgo.git/ffgo/data/locale'
    ~/src/ffgo.git %
    # Everything is up-to-date now.
    That's it.
If you, or anyone else here, needs more explanations about this pip stuff, or about the things I qualified as “out of scope” at the beginning of this message, I can give more details on Mumble (I suggest to use jomo's FlightGear-specific setup instructions for Mumble).

Hope this helps!

P.S. : maybe you'll want to reply to Markus at
http://lists.alioth.debian.org/pipermail/pkg-fgfs-crew/2016-January/001621.html. I don't feel comfortable asking for an upload of my own package, but if other people find it useful, that could be different...
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 9 guests