diff --git a/docs/source/int_source.rst b/docs/source/int_source.rst index 272f18c3..f9075467 100644 --- a/docs/source/int_source.rst +++ b/docs/source/int_source.rst @@ -17,6 +17,14 @@ to build the various components like the translation files and documentation. now deprecated, but many systems still have both Python 2 and 3. For such systems, the command ``python3`` may be needed instead. Likewise, ``pip`` may need to be replaced with ``pip3``. +Most of the custom commands for building packages of novelWriter, or building assets, are contained +in the ``setup.py`` script in the root of the source code. You can list the available commands by +running: + +.. code-block:: bash + + python setup.py help + .. _a_source_depend: @@ -58,37 +66,40 @@ source, dependencies can still be installed from PyPi with: .. _a_source_install: -Install from Source -=================== +Build and Install from Source +============================= -You can download the latest version of novelWriter from the source repository on GitHub_ and run -the setup manually. It is equivalent to what the ``pip install`` command does, and it installs -novelWriter to the default location for Python packages. - -This step requires that you have ``setuptools`` installed on your system. If you don't have it -installed, it can usually be installed from your distro's repository. For Debian and Ubuntu this is -achieved with: +If you want to install novelWriter directly from the source available on GitHub_, you must first +build the package using the Python Packaging Authority's build tool. It can be installed with: .. code-block:: bash - sudo apt install python3-setuptools + pip install --upgrade build -The package is also available from PyPi: +On Debian-based systems the tool can also be installed with: .. code-block:: bash - pip install --user setuptools + sudo apt install python3-build -With ``setuptools`` in place, novelWriter can be installed to the user space with: +With the tool installed, run the following command from the root of the novelWriter source code: .. code-block:: bash - python setup.py install --user + python -m build -.. tip:: +This should generate two files in the ``dist/`` folder at your current location. One with file +extension ``.tar.gz`` and one with extension ``.whl``. The latter is the package you want to +install, here with example version number 2.0.7, but your may be different: - The main setup script has a number of options that may be useful to you. You can list them by - running ``python setup.py help``. +.. code-block:: bash + + pip install --user dist/novelWriter-2.0.7-py3-none-any.whl + +.. warning:: + + Calling ``setup.py install`` has been deprecated for a while, and this approach is no longer + actively supported in novelWriter either. .. _a_source_i18n: diff --git a/setup/make_pip.sh b/setup/make_pip.sh index 9d6d71ef..f26e591e 100755 --- a/setup/make_pip.sh +++ b/setup/make_pip.sh @@ -11,9 +11,13 @@ echo " Building Packages" echo "================================================================================" echo "" python3 setup.py qtlrelease manual sample -python3 setup.py sdist bdist_wheel +python3 -m build mkdir -pv dist_upload cp -v dist/novelWriter-*.whl dist_upload/ +cd dist_upload +FILE=$(ls -t | head -1) +shasum -a 256 $FILE | tee $FILE.sha256 +cd .. echo "" echo " Checking Packages"