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` for the GUI
|
||||||
* `python3-pyqt5.qtsvg` may need to be installed separately
|
* `python3-pyqt5.qtsvg` may need to be installed separately
|
||||||
* `python3-appdirs` for locating the system's config folder
|
|
||||||
* `python3-lxml` for writing project files
|
* `python3-lxml` for writing project files
|
||||||
|
|
||||||
These are optional, but recommended:
|
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:
|
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 pyqt5
|
||||||
python3 -m pip install appdirs
|
|
||||||
python3 -m pip install lxml
|
python3 -m pip install lxml
|
||||||
python3 -m pip install pyenchant
|
python3 -m pip install pyenchant
|
||||||
python3 -m pip install latexcodec
|
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:
|
The following Python packages are required to run novelWriter:
|
||||||
|
|
||||||
* ``pyqt5`` for the GUI
|
* ``pyqt5`` for the GUI
|
||||||
* ``appdirs`` for locating the system's config folder
|
|
||||||
* ``lxml`` for writing project files
|
* ``lxml`` for writing project files
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|||||||
@@ -27,12 +27,6 @@ except:
|
|||||||
print("ERROR: Failed to load dependency python3-lxml")
|
print("ERROR: Failed to load dependency python3-lxml")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
|
||||||
import appdirs
|
|
||||||
except:
|
|
||||||
print("ERROR: Failed to load dependency python3-appdirs")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import nw
|
import nw
|
||||||
nw.main(sys.argv[1:])
|
nw.main(sys.argv[1:])
|
||||||
|
|||||||
+3
-3
@@ -16,11 +16,10 @@ import sys
|
|||||||
import nw
|
import nw
|
||||||
|
|
||||||
from os import path, mkdir, makedirs
|
from os import path, mkdir, makedirs
|
||||||
from appdirs import user_config_dir
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from PyQt5.Qt import PYQT_VERSION_STR
|
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.constants import nwFiles, nwUnicode
|
||||||
from nw.common import splitVersionNumber
|
from nw.common import splitVersionNumber
|
||||||
@@ -167,7 +166,8 @@ class Config:
|
|||||||
def initConfig(self, confPath=None):
|
def initConfig(self, confPath=None):
|
||||||
|
|
||||||
if confPath is 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:
|
else:
|
||||||
logger.info("Setting config from alternative path: %s" % confPath)
|
logger.info("Setting config from alternative path: %s" % confPath)
|
||||||
self.confPath = confPath
|
self.confPath = confPath
|
||||||
|
|||||||
@@ -116,10 +116,6 @@ class nwDependencies():
|
|||||||
"site" : "",
|
"site" : "",
|
||||||
"docs" : "",
|
"docs" : "",
|
||||||
},
|
},
|
||||||
"appdirs" : {
|
|
||||||
"site" : "",
|
|
||||||
"docs" : "",
|
|
||||||
},
|
|
||||||
"lxml" : {
|
"lxml" : {
|
||||||
"site" : "",
|
"site" : "",
|
||||||
"docs" : "",
|
"docs" : "",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
pyqt5
|
pyqt5
|
||||||
appdirs
|
|
||||||
lxml
|
lxml
|
||||||
pyenchant
|
pyenchant
|
||||||
latexcodec
|
latexcodec
|
||||||
|
|||||||
Reference in New Issue
Block a user