packaging

Packaging Python applications with configuration files

大憨熊 提交于 2021-02-06 01:50:43
问题 I'm using ConfigParser for configuring my application, and now I want to make it easily distributable, and at the same time preserve the configurability. I'm thinking I need a directory with configuration file templates, and some way of generating the configuration to actually use from these. Then I need a place to store it that will work in virtualenv, the users home directory etc. I want it to be as close to how normal Unix packages work, i.e. have config in etc, but with overrides in home

How should I create and read a user editable configuration file in ~/.config or similar?

一世执手 提交于 2021-02-05 06:36:08
问题 I am planning a command line Python application that I intend to distribute through PyPi. When the application is installed with pip, I want to create a user-editable configuration file in the appropriate location on the user's filesystem. For example, in Ubuntu, the file would be something like ~/.config/foo/config.ini On installation I want to create the file (if possible) and be able to specify another config file to use instead with a command line parameter. What is the usual scheme for

How should I create and read a user editable configuration file in ~/.config or similar?

自古美人都是妖i 提交于 2021-02-05 06:35:46
问题 I am planning a command line Python application that I intend to distribute through PyPi. When the application is installed with pip, I want to create a user-editable configuration file in the appropriate location on the user's filesystem. For example, in Ubuntu, the file would be something like ~/.config/foo/config.ini On installation I want to create the file (if possible) and be able to specify another config file to use instead with a command line parameter. What is the usual scheme for

Kivy: Builder.load_file('*.kv') throws a FileNotFoundError when packaging app for Windows

半世苍凉 提交于 2021-01-29 05:57:54
问题 I am attempting to package my app for windows but I keep getting this error when running the .exe file generated. The file does exist in the project directory and it works fine when running main.py directly. In my main.py I called Builder.load_file('home_screen.kv'), which is where it seems to be throwing the error. Traceback (most recent call last): File "main.py", line 46, in <module> File "site-packages\kivy\app.py", line 800, in run File "main.py", line 10, in build File "main.py", line

How to support alternate dependencies in a Python package?

梦想的初衷 提交于 2021-01-28 11:46:51
问题 I have written a utility library in Python that works with the Qt framework. My code is pure Python and is compatible with both PyQt5 and PySide2. My main module could either be run on its own from the command line with python -m or it could be imported into another project. Is there a clean way to specify that the project needs either PyQt5 or PySide2 in its a wheel distribution? Here is what I have found in my research but I am asking in case there is a better way to package the project

Can't compile Artifactory 7.10.2

Deadly 提交于 2021-01-03 07:26:25
问题 After JFrog released the source code for Artifactory 7.10.2, I tried to build it, without success. The project seems to be a maven one (there is a pom.xml in the root project, so I guess so). From the root of the project I gave the usual mvn package , but this resulted in an error: $ mvn package [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for org.artifactory:artifactory-parent:7.10.2: Failure to

Accessing Python interpreter from a PyInstaller bundle

吃可爱长大的小学妹 提交于 2020-12-09 03:46:28
问题 I have a program (suppose it is called "PROG") that spawn Pronsole.py (3D Printing). If it is just interpreted by Python, it works good in GNU/Linux and Windows. This is the line that works: self.pronTranspProc=reactor.spawnProcess(self.pronProtProc, pythonPath, [pythonPath, "pronsole.py"], os.environ, self.pronPathPrintrun) When Python is the normal interpreter, "pythonPath" will be just the path to that interpreter, since it is sys.executable. But when a bundle is made with Pyinstaller so

Accessing Python interpreter from a PyInstaller bundle

依然范特西╮ 提交于 2020-12-09 03:44:38
问题 I have a program (suppose it is called "PROG") that spawn Pronsole.py (3D Printing). If it is just interpreted by Python, it works good in GNU/Linux and Windows. This is the line that works: self.pronTranspProc=reactor.spawnProcess(self.pronProtProc, pythonPath, [pythonPath, "pronsole.py"], os.environ, self.pronPathPrintrun) When Python is the normal interpreter, "pythonPath" will be just the path to that interpreter, since it is sys.executable. But when a bundle is made with Pyinstaller so