packaging

Importing a module from an upper directory within a package when the package is imported from another place

旧街凉风 提交于 2020-01-06 08:29:09
问题 I have a project that I am having problems with. kreveik. |-- classes | |-- baseclasses.py | |-- family.py | |-- __init__.py | `-- network.py |-- family | |-- __init__.py | `-- killer.py `-- genetic `-- __init__.py This is the relevant part of the project. The traceback explains me what I was trying to do in my code. /home/mali/workspace/kreveik/<ipython-input-7-ec5770ffbdf2> in <module>() ----> 1 import kreveik /home/mali/workspace/kreveik/kreveik/__init__.py in <module>() ----> 1 import

Trying to access the “current dir” in a packaged Shoes app

情到浓时终转凉″ 提交于 2020-01-05 12:15:24
问题 I need to build an app which reads a file which is external to the Shoes package I'll be distributing it in. In my app, Dir.pwd points to the temp dir (at least in Windows) where the script is unpacked to be ran. I've been trying to get the directory where the exe is running from, that is, the package I'm distributing. The app needs to read a file which is distributed besides this package and then write another one in the same directory. It seems that the Shoes runtime does not set any env

How do you make Python console script entry points work when installed package uses a conda virtual environment?

旧时模样 提交于 2020-01-05 03:51:33
问题 Problem - Shifting from non-virtual to a conda virtual environment causes console script entry points to be unrecognized. Background - I recently tried to get religion about using virtual environments for my Python projects. I decided to do this after update to macOS Catalina caused all of my PyCharm projects to show invalid interpreter errors. I thought "What could go wrong throwing one big mess on top of another?" Two days later I could finally run a script again - the worst brick wall I've

How to pack a SQLite database into a jar?

懵懂的女人 提交于 2020-01-03 04:23:07
问题 I've got a Java project, which uses a small SQLite database. Now I want to create an executable jar File, with the Database file and the driver (sqlitejdbc-v056) inside to have a single, all containing package. My package structure looks like this: Bank | | +---src | ... | +---bin | ... | +---data | bank_database.db | +---img | ajax-refresh-icon.gif | +---doc | Datenbankschema.uxf | \---resources sqlitejdbc-v056.jar I access the DB with this small Java class: package model; import java.sql

How do you specify the shebang line of a command script created by setuptools

孤人 提交于 2020-01-02 05:14:08
问题 I have created a package that I will be distributing throughout the company that replaces a legacy bash script with the same name. It is referenced many places so it needs to execute like the current script does. This has worked fine until I encountered some servers that do not have a current version of Python as the default Python (aka CentOS). Is there a way to specify in the setup.py what shebang line is created at the top of the script file? i.e. I need #!/opt/bin/python rather than #!

Gradle: Could not find method provided()

血红的双手。 提交于 2020-01-01 05:15:30
问题 Which is preferred, provided or provided group and where is this documented? thufir@doge:~/NetBeansProjects/gradleEAR$ thufir@doge:~/NetBeansProjects/gradleEAR$ gradle clean FAILURE: Build failed with an exception. * Where: Build file '/home/thufir/NetBeansProjects/gradleEAR/build.gradle' line: 40 * What went wrong: A problem occurred evaluating root project 'gradleEAR'. > Could not find method provided() for arguments [javax:javaee-api:7.0] on object of type org.gradle.api.internal.artifacts

Is packaging type 'pom' needed when not using project aggregation (multimodule)?

二次信任 提交于 2020-01-01 04:31:07
问题 I want to inherit the dependencies of a (parent) pom.xml in a child project in Maven 2.2.1; i.e. use project inheritance. It seems it is necessary to change the default packaging type from jar to pom in this case. However, doesn't the Maven2 documentation state that the packaging type pom is necessary for project aggregation, i.e. multimodule projects which use submodules, but not for project inheritance? <project> <modelVersion>4.0.0</modelVersion> <groupId>example</groupId> <artifactId

How to set the build area for rpmbuild per-invocation

谁说胖子不能爱 提交于 2019-12-31 08:28:29
问题 I'm modifying an automated build, and want to tell rpmbuild to use a specific build area when invoking it . This is similar to an existing question, but more specific. I don't want to run any of the build commands as the root user; the aim is only to have an RPM, not to install anything into the system. I don't want to require the user to change their dotfiles (e.g. $HOME/.rpmrc ); the build should be self-contained and not affect the user's existing settings. I don't want to hard-code the

Ada: packaging concepts [closed]

醉酒当歌 提交于 2019-12-31 03:39:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . This is a follow up of my earlier post here: Ada: Understanding private types and understanding packaging An implementation for the Rectangular type was made using one implementation i.e. Rectangular_Method_1 and a specification file and a body file were required for this

What is the correct way to include localisation in python packages?

落爺英雄遲暮 提交于 2019-12-31 03:08:07
问题 I am writing my own python application and I am wondering what is the correct way to include localisation in source distributions. I struggled with the documentation of setuptools; localisation is not even mentioned there. I use pypabel to extract my message catalogues and to compile them. Questions Is there a possibility to compile *.po to *.mo automatically before creating a source package with setup.py? Currently I have to compile everything before manually for each language... Where