packaging

During pbuilder build: run setup.py --install-layout=deb fails (no rights to write to /usr/lib/python2.7/dist-packages)

女生的网名这么多〃 提交于 2019-12-11 05:48:22
问题 I am trying to create PPA for PJSIP and would like to include the python-bindings. I modified the Makefile, so that setup.py is called: install: cd somefolder && python setup.py install --install-layout=deb However, in the pbuilder environment it fails due to insufficient rights on /usr/lib/python2.7/dist-packages/ and I cannot use sudo (obviously)... Suggestions? 回答1: Your debian/rules install target must never install any files outside of the build tree. Instead, it should be installing to

package only cythonized binary python files and resource data but ignoring python .py source files

江枫思渺然 提交于 2019-12-11 04:59:56
问题 I need to obfuscate my python code, to achieve it I am using cythonize extension, I am able to achieve it and get the binary compiled a.so files from a.py files but after doing bdist_wheel the .whl package only packages the a.so files and ignores the resource_folder. My project file structure is |main_project |__,setup.py |__,main_folder |____,a.py |____,__init__.py |____resource_folder |__,a.model |__,a.json I used following links to make obfuscated python wheel package, https://bucharjan.cz

netbeans: nothing to fix in import statements. Yet, import is required. (Gradle)

浪尽此生 提交于 2019-12-11 04:45:21
问题 When a crucial import statement is commented out Netbeans reports "nothing to fix in import statement": Putting the import back in, the project builds and runs fine: thufir@dur:~/NetBeansProjects/HelloJsonGradle$ thufir@dur:~/NetBeansProjects/HelloJsonGradle$ gradle clean shadowJar > Task :shadowJar The SimpleWorkResult type has been deprecated and is scheduled to be removed in Gradle 5.0. Please use WorkResults.didWork() instead. BUILD SUCCESSFUL in 1s 4 actionable tasks: 4 executed thufir

Selectively include dependencies in JAR

纵饮孤独 提交于 2019-12-11 03:34:23
问题 I have a library that I wrote in Scala that uses Bouncy Castle and has a whole bunch of dependencies. When I roll a jar, I can either roll a "fat" jar that has all the dependencies (including scala), which weighs in around 19 MB, or I can roll a skinny jar, which doesn't have dependencies, but is only a few hundred KB. The problem is that I need to include the Bouncy Castle classes/jar with my library, because if its not on the classpath at runtime, all kinds of exceptions get thrown. So, I

dpkg-buildpackage -uc -us -b fails with “dpkg-shlibdeps: error: couldn't find library libmono-2.0.so.1 needed by …monodis.”

a 夏天 提交于 2019-12-11 03:09:06
问题 Trying to build simple .deb packages with this script is failing with this: dh_installexamples dh_installman dh_installcatalogs dh_installcron dh_installdebconf dh_installemacsen dh_installifupdown dh_installinfo dh_pysupport dh_installinit dh_installmenu dh_installmime dh_installmodules dh_installlogcheck dh_installlogrotate dh_installpam dh_installppp dh_installudev dh_installwm dh_installxfonts dh_bugfiles dh_lintian dh_gconf dh_icons dh_perl # Skipping dh_usrlocal - empty override dh_link

How to use `pip` and setup.py to automatically install dependencies that may be private repositories hosted on github

拈花ヽ惹草 提交于 2019-12-11 02:27:04
问题 I don't think this is a dupicate, because I tried all links I could find for the past 2 hours and none of the solutions worked. I want the user to be able to clone a repository, cd into the directory, and run $ pip install . (or at least pip install --process-dependency-links . ) to install the package, its pypi dependencies AND its (latest) private github dependencies assuming the user has read permissions for them. (also the devs should be able to run $ pip install -e . ) my setup.py :

Exception in thread “main” java.lang.NoClassDefFoundError: (wrong name [closed]

拜拜、爱过 提交于 2019-12-11 01:23:58
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . my project is in "\BankPrj" folder It has (1).com folder (2) Account.java , Customer.java , TestBanking.java files (3) main class is in TestBanking.java

pip install producing “Could not find a version that satisfies the requirement”

孤人 提交于 2019-12-11 00:45:21
问题 I have a package that i have uploaded to test.pypi. I can install this package in a virtual environment on my machine without any issues using pip install --index-url https://test.pypi.org/simple/ package_name_here There is a list of requirements for the package in a 'requirements.txt' file, which are also included in 'install_requires' in the config dict fed to setup in setup.py. This works fine on my machine. When I try the same process within a clean virtual environment on one of my groups

Django packaging project with multiple apps

∥☆過路亽.° 提交于 2019-12-10 21:20:28
问题 I'm trying to package my Django project without success. My project looks like this: dsbg/ manage.py dsbg/ __init__.py urls.py wsgi.py app1/ __init__.py models.py views.py urls.py app2/ __init__.py models.py views.py urls.py settings/ base.py local.py prod.py static/ app1/ images/ background.gif style.css templates/ home.html app1/ detail.html index.html app2/ detail.html index.html I followed the procedure here but I'm not sure I'm doing the right things (their example has only one app:

KeyError: 0L when running packaged code

拟墨画扇 提交于 2019-12-10 20:31:24
问题 I have script called rra.py that has the following skelton structure: usn="" usnl=[] from bs4 import BeautifulSoup import re import asys import glob import os import sys import sys def inputIndex(): #some processsing def getval(): #some processing def parsehtml(): #some processsing def ret(): #some processing def main(): inputIndex() ret() parsehtml() getval() print "watsuup" asys.Compavg() asys.compSub() print "nearly done" return 0 if __name__ == '__main__': inputIndex() main() asys.Compavg