chore: config to run as local package

This commit is contained in:
thomasabishop 2024-11-14 13:17:26 +00:00
parent 2769b4d1e5
commit 72b1a7ecf7
8 changed files with 34 additions and 9 deletions

View file

@ -1,9 +1,9 @@
# `neuron-zk-generator` # `neuron-zk-generator`
This is a basic Python application that reads data from [my](https://github.com/thomasabishop/eolas) [zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten) and This Python application reads data from [my](https://github.com/thomasabishop/eolas) [zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten) and
formats it so that it can be compiled as a [Neuron](https://neuron.zettel.page/) project and from there published as a static-site on the web. formats it so that it can be compiled as a [Neuron](https://neuron.zettel.page/) project and from there published as a static-site on the Web.
## Running app in local development ## Local development
```sh ```sh
source venv/bin/activate source venv/bin/activate
@ -11,7 +11,21 @@ pip install -r requirements.txt
neuron-zk-generator neuron-zk-generator
``` ```
## Build standalone executable ## Run as local application
```
pipx install [local_path_to_application]
neuron-zk-generator
```
### Update after changes
```
pipx uninstall neuron-zk-generator
pipx install [local_path_to_application]
```
## Build single executable
Use `pyinstaller` to create single executable file. `pyinstaller` is installed Use `pyinstaller` to create single executable file. `pyinstaller` is installed
along with other packages in `requirements.txt`. along with other packages in `requirements.txt`.

View file

@ -1,2 +0,0 @@
termcolor==2.5.0
pyinstaller===6.11.0

View file

@ -1,9 +1,9 @@
from setuptools import setup, find_packages from setuptools import find_packages, setup
setup( setup(
name="neuron-zk-generator", name="neuron-zk-generator",
version="0.1", version="0.1",
packages=find_packages(where="src"), py_modules=["app"],
package_dir={"": "src"}, package_dir={"": "src"},
install_requires=["termcolor", "pyinstaller"], install_requires=["termcolor", "pyinstaller"],
entry_points={ entry_points={

0
src/__init__.py Normal file
View file

View file

@ -1,3 +1,5 @@
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: neuron-zk-generator Name: neuron-zk-generator
Version: 0.1 Version: 0.1
Requires-Dist: termcolor
Requires-Dist: pyinstaller

View file

@ -1,7 +1,16 @@
README.md README.md
setup.py setup.py
src/app.py
src/lib/__init__.py
src/lib/constants.py
src/lib/create_target_dir.py
src/lib/generate_index_file.py
src/lib/list_entries.py
src/lib/transfer_files.py
src/lib/transform_links.py
src/neuron_zk_generator.egg-info/PKG-INFO src/neuron_zk_generator.egg-info/PKG-INFO
src/neuron_zk_generator.egg-info/SOURCES.txt src/neuron_zk_generator.egg-info/SOURCES.txt
src/neuron_zk_generator.egg-info/dependency_links.txt src/neuron_zk_generator.egg-info/dependency_links.txt
src/neuron_zk_generator.egg-info/entry_points.txt src/neuron_zk_generator.egg-info/entry_points.txt
src/neuron_zk_generator.egg-info/requires.txt
src/neuron_zk_generator.egg-info/top_level.txt src/neuron_zk_generator.egg-info/top_level.txt

View file

@ -0,0 +1,2 @@
termcolor
pyinstaller