Don't import nw in setup.py

This commit is contained in:
Veronica K. B. Olsen
2020-10-13 19:27:50 +02:00
parent d2325c57a3
commit e5b24e39ee
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ except getopt.GetoptError:
for inOpt, inArg in inOpts: for inOpt, inArg in inOpts:
if inOpt in ("-h", "--help"): if inOpt in ("-h", "--help"):
print(helpMsg) print(helpMsg)
sys.exit() sys.exit(0)
elif inOpt in ("-d", "--debug"): elif inOpt in ("-d", "--debug"):
buildWindowed = False buildWindowed = False
@@ -72,7 +72,7 @@ if buildWindowed:
instOpt.append("novelWriter.py") instOpt.append("novelWriter.py")
import PyInstaller.__main__ # noqa: F401 import PyInstaller.__main__ # noqa: E402
PyInstaller.__main__.run(instOpt) PyInstaller.__main__.run(instOpt)
print("") print("")
+1
View File
@@ -1,5 +1,6 @@
[metadata] [metadata]
license_files = LICENSE.md license_files = LICENSE.md
version = attr: nw.__version__
[bdist_wheel] [bdist_wheel]
universal = 0 universal = 0
+10 -11
View File
@@ -4,8 +4,6 @@ import sys
import subprocess import subprocess
import setuptools import setuptools
from nw import __version__, __url__, __docurl__, __issuesurl__, __sourceurl__
## ##
# Build the Package # Build the Package
## ##
@@ -119,19 +117,16 @@ if len(sys.argv) == 1:
with open("README.md", "r") as inFile: with open("README.md", "r") as inFile:
longDescription = inFile.read() longDescription = inFile.read()
with open("requirements.txt", "r") as inFile:
pkgRequirements = inFile.read().strip().splitlines()
setuptools.setup( setuptools.setup(
name = "novelWriter", name = "novelWriter",
version = __version__, # version = __version__, # Set in setup.cfg
author = "Veronica Berglyd Olsen", author = "Veronica Berglyd Olsen",
author_email = "code@vkbo.net", author_email = "code@vkbo.net",
description = "A markdown-like document editor for writing novels", description = "A markdown-like document editor for writing novels",
long_description = longDescription, long_description = longDescription,
long_description_content_type = "text/markdown", long_description_content_type = "text/markdown",
license = "GNU General Public License v3", license = "GNU General Public License v3",
url = __url__, url = "https://novelwriter.io",
entry_points = { entry_points = {
"console_scripts" : ["novelWriter-cli=nw:main"], "console_scripts" : ["novelWriter-cli=nw:main"],
"gui_scripts" : ["novelWriter=nw:main"], "gui_scripts" : ["novelWriter=nw:main"],
@@ -140,9 +135,9 @@ setuptools.setup(
include_package_data = True, include_package_data = True,
package_data = {"": ["*.conf"]}, package_data = {"": ["*.conf"]},
project_urls = { project_urls = {
"Bug Tracker": __issuesurl__, "Bug Tracker": "https://github.com/vkbo/novelWriter/issues",
"Documentation": __docurl__, "Documentation": "https://github.com/vkbo/novelWriter/issues",
"Source Code": __sourceurl__, "Source Code": "https://github.com/vkbo/novelWriter",
}, },
classifiers = [ classifiers = [
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
@@ -159,5 +154,9 @@ setuptools.setup(
"Topic :: Text Editors", "Topic :: Text Editors",
], ],
python_requires = ">=3.6", python_requires = ">=3.6",
install_requires = pkgRequirements, install_requires = [
"pyqt5>=5.2.1",
"lxml>=4.2.0",
"pyenchant>=3.0.0",
],
) )