I have configured Plone with the following buildout (via http://build.pythonpackages.com/buildout/plone/4.2.x):
[buildout]
allow-hosts =
*.plone.org
*.python.org
extensions = buildout.bootstrap
extends = http://dist.plone.org/release/4.2b1/versions.cfg
find-links = http://dist.plone.org/thirdparty/elementtree-1.2.7-20070827-preview.zip
parts =
mod-wsgi
plone
plone-mod-wsgi
plone-paste
versions = versions
[mod-wsgi]
recipe = collective.recipe.modwsgi
eggs = ${plone:eggs}
config-file = ${buildout:directory}/plone-mod-wsgi.ini
[plone]
recipe = plone.recipe.zope2instance
eggs =
PasteScript
Pillow
Plone
WebError
repoze.retry
repoze.tm2
repoze.vhm
products =
user = admin:admin
scripts = paster
[plone-mod-wsgi]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone-mod-wsgi.ini.in
output = ${buildout:directory}/plone-mod-wsgi.ini
[plone-paste]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone-paste.ini.in
output = ${buildout:directory}/plone-paste.ini
[versions]
distribute = 0.6.24
zc.buildout = 1.5.2
Zope2 = 2.13.11
And Apache with the following config:
<VirtualHost *:80>
…
# Use only 1 Python sub-interpreter. Multiple sub-interpreters
# play badly with C extensions.
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess plone user=aclark group=staff processes=1 \
threads=4 \
python-path=/srv/aclark.net/eggs
WSGIScriptAlias / /srv/aclark.net/parts/mod-wsgi/wsgi
<Directory /srv/aclark.net>
WSGIProcessGroup plone
Order allow,deny
Allow from all
SetEnv HTTP_X_VHM_HOST http://aclark.net
SetEnv HTTP_X_VHM_ROOT /Plone
</Directory>
</VirtualHost>
My "declarative" WSGI configuration (called by /srv/aclark.net/parts/mod-wsgi/wsgi) looks like this:
[app:plone]
use = egg:Zope2#main
zope_conf = /srv/aclark.net/parts/plone/etc/zope.conf
[pipeline:main]
pipeline =
egg:repoze.retry#retry
egg:repoze.tm2#tm
egg:repoze.vhm#vhm_xheaders
plone
# Begin logging configuration
[loggers]
keys = root
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
# End logging configuration
This all partially works, by loading http://aclark.net/Plone when you ask for http://aclark.net. However Zope2 is still generating URLs that begin with http://aclark.net/Plone.
Am I missing something? Or is this a Zope2 bug (not doing the right thing when conifgured w/repoze.vhm)
what about:
[filter:vhm]
use = egg:repoze.vhm#vhm_explicit
host = http://www.example.com
root = /mysite
Full WSGI support for Zope2 is still a work in progress. See:
https://mail.zope.org/pipermail/zope-dev/2012-January/043930.html
Related
I'm trying to build pyinstaller recipe, I used pipoe here , but I got this error while i Told it to inherit pypi setuptools. Can anyone help please?
THank you .
ERROR: ParseError at /home/yasmine/yocto/poky/meta-pyinst/recipes-pyinstaller/pyinstaller/python-altgraph_0.17.bb:16: Could not inherit file classes/setuptools.bbclass
First, it is good practice to use pipoe to create python recipes automatically.
Check my response here on how to use it.
I used it to create pyinstaller recipe, it detected that pyinstaller depends, in run time RDEPENDS, on:
python3-altgraph
python3-pyinstaller-hooks-contrib
So, here are the recipes:
python3-pyinstaller_4.5.1.bb
SUMMARY = "PyInstaller bundles a Python application and all its dependencies into a single package."
HOMEPAGE = "http://www.pyinstaller.org/"
AUTHOR = "Hartmut Goebel, Giovanni Bajo, David Vierra, David Cortesi, Martin Zibricky <>"
LICENSE = "CLOSED"
SRC_URI = "https://files.pythonhosted.org/packages/a9/d9/9fdfb0ac2354d059e466d562689dbe53a23c4062019da2057f0eaed635e0/pyinstaller-4.5.1.tar.gz"
SRC_URI[md5sum] = "cd1fab890e538ed62ac9121e043632e3"
SRC_URI[sha256sum] = "30733baaf8971902286a0ddf77e5499ac5f7bf8e7c39163e83d4f8c696ef265e"
S = "${WORKDIR}/pyinstaller-4.5.1"
RDEPENDS_${PN} = "python3-setuptools python3-altgraph python3-pyinstaller-hooks-contrib"
DEPENDS += "python3-wheel python3-wheel-native"
inherit setuptools3
python3-pyinstaller-hooks-contrib_2021.2.bb
SUMMARY = "Community maintained hooks for PyInstaller"
HOMEPAGE = "https://github.com/pyinstaller/pyinstaller-hooks-contrib"
AUTHOR = " <>"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=822bee463f4e00ac4478593130e95ccb"
SRC_URI = "https://files.pythonhosted.org/packages/eb/fa/fe062e44776ab8edb4ac62daca1a02bb744ebdd556ec7a75c19c717e80b4/pyinstaller-hooks-contrib-2021.2.tar.gz"
SRC_URI[md5sum] = "322f5534dd0df2d3fbb8fd55ec7cddbf"
SRC_URI[sha256sum] = "7f5d0689b30da3092149fc536a835a94045ac8c9f0e6dfb23ac171890f5ea8f2"
S = "${WORKDIR}/pyinstaller-hooks-contrib-2021.2"
RDEPENDS_${PN} = ""
inherit setuptools3
python3-altgraph_0.17.bb
SUMMARY = "Python graph (network) package"
HOMEPAGE = "https://altgraph.readthedocs.io"
AUTHOR = "Ronald Oussoren <ronaldoussoren#mac.com>"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3590eb8d695bdcea3ba57e74adf8a4ed"
SRC_URI = "https://files.pythonhosted.org/packages/22/5a/ac50b52581bbf0d8f6fd50ad77d20faac19a2263b43c60e7f3af8d1ec880/altgraph-0.17.tar.gz"
SRC_URI[md5sum] = "9450020282270749db205038b8c90b55"
SRC_URI[sha256sum] = "1f05a47122542f97028caf78775a095fbe6a2699b5089de8477eb583167d69aa"
S = "${WORKDIR}/altgraph-0.17"
RDEPENDS_${PN} = ""
inherit setuptools3
If you have a custom layer, you can create:
meta-custom/recipes-python/pyinstaller
and put all three recipes inside that.
Now, just add python3-pyinstaller to IMAGE_INSTALL :
IMAGE_INSTALL_append = " python3-pyinstaller"
It could be that your setup only have python3 so you either change the inherit from setuptools to setuptools3, or your tell pipoe to use python3 by typing:
pipoe --python python3 --package pyinstaller
If you then read the generated files you would see that it inherits setuptools3.
I am attempting to use the pool package in my Shiny golem application.
I have slightly updated the default golem-config.yml:
default:
golem_name: mygolem
golem_version: 0.0.0.9000
app_prod: no
default_programs: !expr c(1:10000)
db_host: mydata.us-west-2.rds.amazonaws.com
db_name: efs
dev:
golem_wd: !expr here::here()
default_programs: !expr c(1:10000)
db_host: mydata-new.us-west-2.rds.amazonaws.com
db_name: efs
production:
default_programs: !expr c()
db_host: mydata-new.us-west-2.rds.amazonaws.com
db_name: efs
app_prod: yes
In order to use pool, I have a R/globals.R file that contains a single call:
pool <- pool::dbPool(
RMySQL::MySQL(),
dbname = get_golem_config("db_name"),
host = get_golem_config("db_host"),
username = Sys.getenv("DB_USERNAME"),
password = Sys.getenv("DB_PASSWORD")
)
My .Renviron file is in my project root folder.
I can not figure out why I keep getting this error when I deploy to Shinyapps.io:
Config file not found in current working directory or parent directories
It builds locally fine. And, when I hard replace dbname and host with the actual values from the golem-config.yml file, it builds and deploys just fine.
So there is something about the get_golem_config() function that is causing this error. Here is my function:
get_golem_config <- function(value, config = Sys.getenv("R_CONFIG_ACTIVE", "default"), use_parent = TRUE) {
config::get(value = value,
config = config,
file = app_sys("golem-config.yml"),
use_parent = use_parent
)
}
app_sys is a simple wrapper around system.file with the package parameter pre-populated by my own package name.
I think it has something to do with the config::get, because when I edit my globals.R file to be:
pool <- pool::dbPool(
RMySQL::MySQL(),
dbname = config::get(value = "db_name",
config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
file = app_sys("golem-config.yml"),
use_parent = TRUE
),
host = config::get(value = "db_host",
config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
file = app_sys("golem-config.yml"),
use_parent = TRUE
),
username = Sys.getenv("DB_USERNAME"),
password = Sys.getenv("DB_PASSWORD")
)
The error returns.
I am trying to commit my manifest.toml file for a private Julia project that has a private dependancy. In the manifest.toml file, it has a local path to the project for the private dependancy as follows:
[[Private_Package]]
deps = ["AbstractTrees", "D3Trees", "DataStructures", "Distributions", "LinearAlgebra", "POMDPs", "Parameters", "Printf", "Random", "StatsBase"]
path = "/Users/logankilpatrick/.julia/dev/Private_Package"
uuid = "rand-rand-rand"
version = "0.X.0"
How can I keep this in my manifest file but make sure it's not a local path so I can commit to the repo?
I ended up going with Pkg.add() per #kevbonham suggestion. It did the trick:
[[Private_Package]]
deps = ["AbstractTrees", "D3Trees", "DataStructures", "Distributions", "LinearAlgebra", "POMDPs", "Parameters", "Printf", "Random", "StatsBase"]
git-tree-sha1 = "x_x_x"
repo-rev = "master"
repo-url = "https://github.com/Private_Package/Private_Package.git"
uuid = "rand-rand-rand-rand-rand"
version = "0.2.0"
Thank you both #DavidVarela
How below both deployments are different
<feature name="my-base-bundles" version="${project.version}">
<bundle start-level="86">mvn:com.my.osgi/mycomponent/0.0.1</bundle>
</feature>
and
bundle:install -s mvn:com.my.osgi/mycomponent/0.0.1
what i observed is deploying with feature shows service:list like
[com.my.osgi.mycomponent]
-----------------------------------------------------
instance.name = mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
service.bundleid = 76
service.factoryPid = com.my.osgi.mycomponent
service.id = 397
service.pid = com.my.osgi.mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
service.scope = bundle
and by deploying with bundle:install
[org.apache.felix.ipojo.Factory]
--------------------------------
component.class = com.my.osgi.mycomponent
component.description = factory name="com.my.osgi.mycomponent" bundle="77" state="valid" implementation-class="com.my.osgi.mycomponent"
requiredhandlers list="[org.apache.felix.ipojo:properties, org.apache.felix.ipojo:callback, org.apache.felix.ipojo:provides, org.apache.felix.ipojo:architect
ure]"
missinghandlers list="[]"
provides specification="com.my.osgi.mycomponent"
inherited interfaces="[com.my.osgi.mycomponent]" superclasses="[]"
component.providedServiceSpecifications = [com.my.osgi.mycomponent]
factory.name = com.my.osgi.mycomponent
factory.state = 1
service.bundleid = 77
service.id = 153
service.pid = com.my.osgi.mycomponent
service.scope = singleton
it work fine but my pax-exam tests are getting failed as after installing i look for service
serviceReferences = this.bundleContext.getServiceReferences("com.my.osgi.mycomponent", filter);
how i should deploy in pax-exam so i can access services like feature deployments?
The start level is different between the two installations.
Feature installation: start level = 86 explicitly
bundle installation: start level = defaut = 90 implicitly
So try to install the bundle with the some start-level value
I'm new to Autotools and I'm trying to add gtest Unit Tests to a project that is using Autotools.
I have a simple directories structure:
. - main
./src - sources
./tests - tests
./paths - git submodule with paths
In tests directory I have one cpp file per tested class and my Makefile.am looks like so:
AUTOMAKE_OPTIONS = serial-tests
AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/paths -DUNIT_TEST
AM_LDFLAGS = -pthread
LDADD = -lgtest -lgtest_main
TESTS = test_networkconfig test_dummy ### depending on content of this variable
check_PROGRAMS = $(TESTS)
test_networkconfig_SOURCES = test_networkconfig.cpp ### generate this
test_networkconfig_LDADD = $(top_srcdir)/src/networkconfig.o \
-lgtest \
-lgtest_main
test_networkconfig_CPPFLAGS = $(somelibrary_CFLAGS)
test_dummy_SOURCES = test_dummy.cpp ### and this variable
I would like to automatically generate:
test_networkconfig_SOURCES = test_networkconfig.cpp
test_dummy_SOURCES = test_dummy.cpp
Is there a way to create a variable <some_name>_SOURCES = <some_name>.cpp for each value that is held by TESTS variable?
In Automake you can only do this in a limited way. In particular, for a program P, if P_SOURCES is not defined, then Automake will compute a default using the program name and the value of AM_DEFAULT_SOURCE_EXT (defaults to .c).
So in your case:
AM_DEFAULT_SOURCE_EXT = .cpp
should do the trick.