Remove dependency on appdirs package for finding config dir as this is provided by Qt
This commit is contained in:
@@ -70,7 +70,6 @@ For the apt package manager on Debian systems, the following Python3 packages ar
|
||||
|
||||
* `python3-pyqt5` for the GUI
|
||||
* `python3-pyqt5.qtsvg` may need to be installed separately
|
||||
* `python3-appdirs` for locating the system's config folder
|
||||
* `python3-lxml` for writing project files
|
||||
|
||||
These are optional, but recommended:
|
||||
@@ -88,7 +87,6 @@ in the application folder.
|
||||
You can also do them one at a time, skipping the ones you don't need:
|
||||
```
|
||||
python3 -m pip install pyqt5
|
||||
python3 -m pip install appdirs
|
||||
python3 -m pip install lxml
|
||||
python3 -m pip install pyenchant
|
||||
python3 -m pip install latexcodec
|
||||
|
||||
@@ -26,7 +26,6 @@ On some operating systems you need to use ``python3`` instead of ``python``.
|
||||
The following Python packages are required to run novelWriter:
|
||||
|
||||
* ``pyqt5`` for the GUI
|
||||
* ``appdirs`` for locating the system's config folder
|
||||
* ``lxml`` for writing project files
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -27,12 +27,6 @@ except:
|
||||
print("ERROR: Failed to load dependency python3-lxml")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import appdirs
|
||||
except:
|
||||
print("ERROR: Failed to load dependency python3-appdirs")
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import nw
|
||||
nw.main(sys.argv[1:])
|
||||
|
||||
+3
-3
@@ -16,11 +16,10 @@ import sys
|
||||
import nw
|
||||
|
||||
from os import path, mkdir, makedirs
|
||||
from appdirs import user_config_dir
|
||||
from datetime import datetime
|
||||
|
||||
from PyQt5.Qt import PYQT_VERSION_STR
|
||||
from PyQt5.QtCore import QT_VERSION_STR
|
||||
from PyQt5.QtCore import QT_VERSION_STR, QStandardPaths
|
||||
|
||||
from nw.constants import nwFiles, nwUnicode
|
||||
from nw.common import splitVersionNumber
|
||||
@@ -167,7 +166,8 @@ class Config:
|
||||
def initConfig(self, confPath=None):
|
||||
|
||||
if confPath is None:
|
||||
self.confPath = user_config_dir(self.appHandle)
|
||||
confRoot = QStandardPaths.writableLocation(QStandardPaths.ConfigLocation)
|
||||
self.confPath = path.join(confRoot, self.appHandle)
|
||||
else:
|
||||
logger.info("Setting config from alternative path: %s" % confPath)
|
||||
self.confPath = confPath
|
||||
|
||||
@@ -116,10 +116,6 @@ class nwDependencies():
|
||||
"site" : "",
|
||||
"docs" : "",
|
||||
},
|
||||
"appdirs" : {
|
||||
"site" : "",
|
||||
"docs" : "",
|
||||
},
|
||||
"lxml" : {
|
||||
"site" : "",
|
||||
"docs" : "",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
pyqt5
|
||||
appdirs
|
||||
lxml
|
||||
pyenchant
|
||||
latexcodec
|
||||
|
||||
Reference in New Issue
Block a user