First PKGBUILD - PyMbs - A Python tool for modelling multibody systems

I've tried to make a PKGBUILD for PyMbs (bitbucket.org/pymbs/pymbs), a tool for modelling multibody systems. My try can be seen at this Github gist: https://gist.github.com/Psirus/00d3e873c22e5ee6d8e7, copied here:
# Maintainer: Christoph Pohl <christoph.pohl1[at]mailbox[dot]tu-dresden[dot]de>
pkgname=PyMbs-hg
pkgver=0.2.2.r1752
pkgrel=1
pkgdesc="A Python tool to model multibody systems"
arch=('i686' 'x86_64')
url="http://www.bitbucket.org/pymbs/pymbs"
license=('LGPL')
depends=('python2-numpy' 'python2-scipy' 'python2-matplotlib' 'vtk' 'python2-pyqt4' 'python2-h5py' )
makedepends=('cmake' 'mercurial')
checkdepends=('python2-mock')
source=('hg+https://bitbucket.org/pymbs/pymbs')
md5sums=('SKIP')
_hgroot='https://bitbucket.org/pymbs/pymbs'
_hgrepo='pymbs'
build() {
cd "$srcdir"
msg "Connecting to Mercurial server...."
if [[ -d "$_hgrepo" ]]; then
cd "$_hgrepo"
hg pull -u
msg "The local files are updated."
else
hg clone "$_hgroot" "$_hgrepo"
fi
msg "Mercurial checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_hgrepo-build"
cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
package() {
cd "$srcdir/$_hgrepo-build"
python2 setup.py install --root="$pkgdir/" --optimize=1
As far as I can tell, it works on my machine (tm), but I would still like some feedback before I upload it to the AUR.

namcap says:
PyMbs-hg E: No upper case letters in package names
PyMbs-hg W: No ELF files and not an "any" package
PyMbs-hg E: Dependency python detected and not included (programs ['python'] needed in scripts ['usr/lib/python2.7/site-packages/PyMbs/Graphics/osgviewerQt4.py'])
The first error is obvious, the last error seems like it might need fixing since python3 is the default in Arch. I'm not sure about the warning; I don't know if .pyc files are architecture specific
Last edited by Spider.007 (2014-05-03 15:11:10)

Similar Messages

  • The tool for testing developed system

    We have already developed a system base on WebAS.Is there  some test tool for the developed system such as J Unit in Java?Thanks.

    If your intentions is to test user interfaces or scenarios eCatt is the best choice. If you want to ensure code quality ABAP Unit and Code Inspector are suited well.
    http://help.sap.com/saphelp_nw04s/helpdata/en/10/6d1c370c468b7be10000009b38f936/frameset.htm
    Best Regards
      Klaus

  • Python tool for keeping track of strings

    I wrote this just now. It associates keys to strings; basically a centralized means of storing values.
    #!/usr/bin/env python
    from cPickle import load, dump
    from sys import argv
    from os.path import expanduser
    strings_file = expanduser('~/lib/cfg-strings')
    try:
    with open(strings_file) as f:
    strings = load(f)
    except:
    strings = {}
    if len(argv) < 2:
    print('''usage:
    {0} dump
    {0} get <key>
    {0} del <key>
    {0} set <key> <val>'''.format(argv[0]))
    elif len(argv) == 2:
    if argv[1] == 'dump':
    for k in strings.keys(): print(k + ': ' + strings[k])
    elif len(argv) == 3:
    if argv[1] == 'get':
    if argv[2] in strings.keys():
    print(strings[argv[2]])
    elif argv[1] == 'del':
    if argv[2] in strings.keys():
    del(strings[argv[2]])
    elif len(argv) == 4:
    if argv[1] == 'set':
    strings[argv[2]] = argv[3]
    with open(strings_file, 'w') as f:
    dump(strings, f)
    Replace '~/lib/cfg-strings' with your preferred destination for the pickle file.
    As an example, I have this at the end of my .xinitrc:
    exec $(cfg get wm)
    so all I have to do is type "cfg set wm ..." to change my window manager. Note that on my system, the script is named 'cfg', so you'll want to change that depending on what you call it.
    To be honest, though, I think everyone has written something like this at least once.
    Last edited by Peasantoid (2010-01-18 01:29:14)

    Nice idea Peasantoid! I have wanted something similar for myself for a while now however wasn't exactly sure how best to do this. Here's my version. It is based on yours though as I prefer plain text for the settings file so I used JSON.
    #!/usr/bin/python
    import json
    import os.path
    import sys
    SETTINGS_FILE = os.path.expanduser('~/configs/settings.json')
    def dump(s):
    print json.dumps(s, sort_keys = True, indent=2)
    def get(s, key):
    if s.has_key(key):
    print s[key]
    def set(s, key, val):
    s[key] = val
    save(s)
    def delete(s, key):
    if s.has_key(key):
    del s[key]
    save(s)
    def save(s):
    json.dump(s, open(SETTINGS_FILE, 'w'))
    def usage():
    str = [
    "usage: %s dump (default)",
    " %s get <key>",
    " %s set <key> <val>",
    " %s delete <key>"
    for x in str:
    print x % sys.argv[0]
    def main():
    try:
    settings = json.load(open(SETTINGS_FILE))
    except:
    settings = {}
    a = sys.argv
    n = len(a)
    if n == 1 or (n == 2 and a[1] == 'dump'):
    dump(settings)
    elif n == 3 and a[1] == 'get':
    get(settings, a[2])
    elif n == 3 and a[1] == 'delete':
    delete(settings, a[2])
    elif n == 4 and a[1] == 'set':
    set(settings, a[2], a[3])
    else:
    usage()
    if __name__ == "__main__":
    main()

  • Windows 8 free upgrade tool for model VPCF226FM

    Hi everyone I used before to download the free upgrade tool from support website, where it helped me to uninstall incompitable drivers/tools/utilities and re-install them later after upgrading to Windows 8 I am not able to find that tool anymore and downloading/installing drivers one by one is not working fine. I have removed power management & Vaio control center and re-installed more than dozen time and still have same issue as unable to use FN keys to control brightness

     
    Hi athensguy, 
    Thank you for considering Sony Community! 
    I am not sure what specific application you used before but all drivers and software that is compatible with your machine are listed on eSupport website. If you are refereeing to the upgrade from Windows 7 to Windows 8, please visit this link: Windows® 8 Upgrade Instructions for VAIO® PCs 
    If your main issue is the function key (Fn), you may follow these steps to troubleshoot the laptop. 
    Power Cycle - Remove the battery and all peripherals -> press and hold the power button for 5 seconds
    Reset BIOS. 
    Got o Device Manager -> Keyboards -> right click Keyboard driver -> Uninstall (DO NOT DELETE) -> restart the laptop. The driver will be reinstalled.  
    Download or update all the drivers from eSupport website.  
    For further assistance, we kindly recommend visiting our Sony Global Web site for information on contacting the Sony Support Center in your region at http://www.sony.net/SonyInfo/Support/.
    Hope these help. 
    Thanks, 
    If my post answers your question, please mark it as "Accept as Solution"
     

  • Tools for R/3 System consilidation?

    Hello,
    does anybody know of SAP or third party tools to consolidate two older R/3 sytems (3.1i and 4.0b) into a new mySAP ERP2004 system?
    Thanks
    Franz

    Hi
    We have done many upgrades from 3.1i/h to mySAP ERP ECC 5.0 in the last two years.  We can take the consolidation approach as individualy migrating the databases to the mySAP ECC from 3.1i and incrementally from 4.0b. 
    We are Chennai,India based software development company which will again reduce the upgrade and consolidataion cost. 
    Please rely to [email protected] (work [email protected]) email and we can discuss further on this issues.  My name is Subbu, and telephone 91-044-2235 4700 ext 107.
    Regards,
    Subbu

  • Report tool for Windows 2003 System

    Hi everyone,
    I've just managed a Windows Server 2003, Oracle 10g running. I want to a tool what collect Disk I/O, Memory, ... statistics by month like ltom, oswatcher. Could you recommend ?
    Best Regards.

    I would use the performance monitor tool. Just go Start -> run -> perfmon and it will open up. you can add whatever stats to it you like and have it logging permanently, etc. We have them running all the time to collect stats so that if we want to go back we can.

  • Pls help me to find admin tool for latest bi linux version

    Hello,
    Oracle Business Intelligence, v. 11.1.1.5.0
    I installed the latest version of OBIEE of linux version 64 bit on the server.
    Installation went fine.
    Now the only problem is finding Admin tool.
    Could u pls tell me where its sitting.
    I know i Windows it Admintool.exe
    Thanks

    Hi user,
    Firstly you wont have admin tool for linux environment....you need to install the client on windows local machine and access the BI server of linux by setting up a connection.
    So you need to download 64-bit or 32-bit windows one to install http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/biee-111150-393613.html
    Read this document :- http://download.oracle.com/docs/cd/E21764_01/bi.1111/e10539/c5_postinstall.htm#CEGEHEJF
    hope answered your question.
    Cheers,
    KK

  • Chart of account conversion SLO tool,method for a Production system

    Hi All
    We have a requirement like we want to use Chart of account conversion tool for a production system where transactional data are present.
    We have used this COA conversion tool for best practice solution not in a production system.
    we want to know the difference between these two methods like production and non production system.
    Provide me some process document on the SLO service tool for the same
    Mrinal dey
    9836265158

    Hi Mrinal
    I'm wondering the same? How to go on in productive system after to use the conversion toll?
    How did you manage?
    Regards
    Angels

  • First PKGBUILD for review

    Hello, since this is the first package I've created, I thought it would be best to have it reviewed before submitting it to the AUR.
    Thank you!
    PKGBUILD:
    # Maintainer: Jeremey Hustman <jeremeyhustman at gmail daught com>
    pkgname=cflint-git
    _gitname=CFLint
    pkgver=CFLint.0.4.release.r21.d446a95
    pkgrel=1
    pkgdesc="A static code analysis tool for ColdFusion"
    url=https://github.com/cflint/CFLint/wiki
    arch=(any)
    license=('(L)GPL3')
    depends=()
    makedepends=('git' 'maven')
    conflicts=($_gitname)
    provides=($_gitname)
    noextract=()
    source=("git://github.com/cflint/${_gitname}.git")
    md5sums=('SKIP')
    pkgver() {
    cd "$_gitname"
    # Git, tags available
    printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
    build() {
    if [ -d "${_gitname}" ]; then
    cd "$_gitname"
    git clean -dfx
    git reset --hard
    git pull origin master
    else
    git clone "${_gitroot}"
    cd "${_gitname}"
    fi
    mvn clean install
    package() {
    cd "${srcdir}/${_gitname}"
    mkdir -p ${pkgdir}/{usr/bin,usr/etc,usr/lib}
    pwd
    install -Dm755 target/appassembler/bin/* "${pkgdir}/usr/bin/"
    install -Dm644 target/appassembler/etc/* "${pkgdir}/usr/etc/"
    install -Dm644 target/appassembler/lib/* "${pkgdir}/usr/lib/"

    First off, the entire if/else block in the build function is not only unnecessary but counter productive. Get rid of it.
    What is the pwd command in the package function for?
    You did well with quoting in general, but missed the mkdir command.
    I would suggest cleaning up the pkgver a bit. You really don't want it to start with "CFLint", for example.

  • First PKGBUILD: 'cannot stat' error for source file

    I'm attempting my first PKGBUILD and I've run into some trouble.
    PKGBUILD:
    # Maintainer: Simon Wydooghe <hyperbaton at gmail dot com>
    pkgname=vpcs
    pkgver=0.21a
    pkgrel=1
    pkgdesc="Simulates up to 9 computers for ping/traceroute purposes."
    arch=('i686' 'x86_64')
    url="http://vpcs.sourceforge.net/"
    license=('GPL')
    makedepends=('p7zip')
    source=('${pkgname}_${pkgver}.7z::http://downloads.sourceforge.net/project/${pkgname}/binary/${pkgver}/${pkgname}_${pkgver}.7z')
    noextract=('${pkgname}_${pkgver}.7z')
    md5sums=('dac71bdf9d04a3b7e69fe25b15f1ee5c')
    package() {
    local vpcsdir="opt/vpcs"
    local binary="vpcs32"
    cd "${srcdir}"
    mv ${pkgname}_${pkgver}.7z.part ${pkgname}_${pkgver}.7z
    7z e -o"${pkgname}-${pkgver}" "${pkgname}_${pkgver}.7z"
    cd "${pkgname}-{$pkgver}"
    mv startup.vpc readme.txt ${pkgdir}/${vpcsdir}
    if [ $CARCH = "x86_64" ]; then
    binary="vpcs64"
    fi
    mv ${binary} ${pkgdir}/${vpcsdir}/vpcs
    chmod +x ${pkgdir}/${vpcsdir}/vpcs
    Error when running makepkg:
    [hb@hb-desktop vpcs]$ makepkg
    ==> Making package: vpcs 0.21a-1 (Mon Apr 4 15:48:07 CEST 2011)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading ${pkgname}_${pkgver}.7z...
    --2011-04-04 15:48:07-- http://downloads.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z
    Resolving downloads.sourceforge.net... 216.34.181.59
    Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: http://switch.dl.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z [following]
    --2011-04-04 15:48:07-- http://switch.dl.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z
    Resolving switch.dl.sourceforge.net... 130.59.138.21, 2001:620:0:1b::21
    Connecting to switch.dl.sourceforge.net|130.59.138.21|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1168714 (1.1M) [application/x-7z-compressed]
    Saving to: “vpcs_0.21a.7z.part”
    100%[======================================================================================================================================>] 1,168,714 1.10M/s in 1.0s
    2011-04-04 15:48:08 (1.10 MB/s) - “vpcs_0.21a.7z.part” saved [1168714/1168714]
    mv: cannot stat `/home/hb/abs/vpcs/${pkgname}_${pkgver}.7z.part': No such file or directory
    ==> ERROR: Failure while downloading ${pkgname}_${pkgver}.7z
    Aborting...
    So it seems that '.part' is being added to the source filename when being downloaded by makepkg. I added '${pkgname}_${pkgver}.7z::' in front of the source url to rename the file (I believe that's correct, no?).
    This is the PKGBUILD directory after running makepkg:
    [hb@hb-desktop vpcs]$ ls -l
    total 1152
    -rw-r--r-- 1 hb hb 884 Apr 4 15:47 PKGBUILD
    drwxr-xr-x 2 hb hb 4096 Apr 4 16:01 src
    -rw-r--r-- 1 hb hb 1168714 Mar 8 04:18 vpcs_0.21a.7z.part
    I can stat the file in question:
    [hb@hb-desktop vpcs]$ stat vpcs_0.21a.7z.part
    File: `vpcs_0.21a.7z.part'
    Size: 1168714 Blocks: 2288 IO Block: 4096 regular file
    Device: 805h/2053d Inode: 1046825 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1000/ hb) Gid: ( 1000/ hb)
    Access: 2011-04-04 16:01:22.000000000 +0200
    Modify: 2011-03-08 04:18:48.000000000 +0100
    Change: 2011-04-04 16:01:22.477037824 +0200
    Birth: -
    So can someone tell me which moronic error I've made this time? :-)

    Excellent, thanks, that did the trick!
    While I've opened this topic anyway, I have another question. The application in question uses a configuration file which it only looks for in the directory the executable resides in (unless a specific command line argument is given). For this reason, it seems most logical to place the application under /opt. But /opt is not in $PATH by default. What is the best way to add the directory /opt/vpcs to $PATH but to also remove it from $PATH when the application is removed?
    Last edited by HyperBaton (2011-04-04 14:33:45)

  • First PKGBUILD - looking for review

    Hello all,
    I have created my first PKGBUILD for some new scientific computing libraries and corresponding examples related to my field. I am looking for input before submitting this to the authors for inclusion on their site (and possibly to the AUR if there ends up being more interest).
    Anyway, here is what I have so far, which seems to work on my system:
    PKGBUILD:
    pkgname=ismrmrd-git
    pkgver=20121030
    pkgrel=1
    pkgdesc="Libraries and examples for the proposed ISMRM Raw Data format"
    url="http://ismrmrd.sourceforge.net"
    arch=('any')
    license=('unknown')
    depends=('hdf5-fortran-cxx'
    'boost-libs'
    'xsd'
    'xerces-c')
    optdepends=('fftw: used to compile example programs'
    'doxygen: only needed if you want to produce your own copy of the documentation')
    makedepends=('unzip'
    'git'
    'cmake')
    # install="${pkgname}.install"
    # source=("http://www.syntax-on.com/static/$pkgname/$pkgname-$pkgver.tar.gz")
    # source=("http://downloads.sourceforge.net/project/ismrmrd/src/${pkgname}_${pkgver}.zip")
    source=("cmakelists.diff")
    noextract=("${pkgname}_${pkgver}.zip")
    md5sums=("9ec7ed899e488961826fa41da7109a84")
    _gitroot="git://git.code.sf.net/p/ismrmrd/code"
    _gitname="ismrmrd"
    build() {
    cd "${srcdir}"
    # unzip ${pkgname}_${pkgver}.zip -d ${pkgname}-${pkgver}
    msg "Connecting to GIT server..."
    if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "Local files have been updated"
    else
    git clone $_gitroot "${srcdir}/$_gitname"
    fi
    msg "Received code from GIT or server timed out"
    # stop CMakeLists.txt appending an unwanted dir to the CMAKE_INSTALL_PREFIX
    # also prevent install of /usr/cmake/FindIsmrmrd.cmake
    msg "Patching CMakeLists.txt to comply with Arch Packaging Standards..."
    cd "${srcdir}/${_gitname}"
    patch < ${startdir}/cmakelists.diff --forward
    # start the build
    mkdir "${srcdir}/${_gitname}/build" -p
    cd "${srcdir}/${_gitname}/build"
    msg "Starting cmake..."
    cmake -DCMAKE_INSTALL_PREFIX=/usr ../
    msg "Starting make..."
    make
    package() {
    cd "${srcdir}/${_gitname}/build"
    make DESTDIR="${pkgdir}/" install
    cmakelists.diff
    --- src/ismrmrd-latest/CMakeLists.txt 2012-10-30 11:48:03.332945241 -0500
    +++ src/ismrmrd-latest/CMakeLists_mod.txt 2012-10-30 11:48:27.619612710 -0500
    @@ -10,7 +10,7 @@
    endif (WIN32)
    -set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
    +# set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
    list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
    find_package(XSD REQUIRED)
    @@ -69,7 +69,7 @@
    INSTALL(FILES ismrmrd.h ${XSDS_SOURCES} ismrmrd_hdf5.h ismrmrd_hdf5_datatypes.h ismrmrd_export.h DESTINATION include)
    INSTALL(FILES schema/ismrmrd.xsd DESTINATION schema)
    -INSTALL(FILES cmake/FindIsmrmrd.cmake DESTINATION cmake)
    +# INSTALL(FILES cmake/FindIsmrmrd.cmake DESTINATION cmake)
    INSTALL(TARGETS ismrmrd DESTINATION lib)
    INSTALL(TARGETS ismrmrd_xsd DESTINATION lib)
    I'm not using any .install file, is this something big I am missing? Again, this is my first time writing a PKGBUILD, so I appreciate any feedback. Thanks!

    Thanks - I will take note for future packages, or if I end up using a non-git version. makepkg seemed to not be able to handle the zip file itself, though. If I re-hosted the source myself in a tarball it worked, but on the authors' site I could only find it as a zip.
    My main question is still about installation location, though. This typically installs itself in:
    /usr/local/ismrmrd/bin
    /usr/local/ismrmrd/lib
    /usr/local/ismrmrd/include
    /usr/local/ismrmrd/schema
    /usr/local/ismrmrd/cmake
    I was able to change this to:
    /usr/bin
    /usr/lib
    /usr/include
    /usr/schema
    Obviously this prevents cmake/FindIsmrmrd.cmake from being installed at all (not sure this is OK or desirable), It also creates the /usr/schema directory, which I don't think is really standard. Where should I put such files? Should I instead install the whole package into /usr/opt/ismrmrd? It doesn't seem big enough to warrant that, but I don't know where else to put the schema and cmake directories and the associated files. Maybe in /usr/share?
    Last edited by aganders3 (2012-11-07 20:20:40)

  • Tools for data modeling

    Hi,
             Can any one tell me if there are any specific tools used for logical data modeling in SAP BW data modeling . I have used Erwin as a data modeling tool for implentation of data ware house, I would like to know if there are any specific tools for SAP BW implementations.
    Response appreciated
    tanu

    Another related discussion: Looking for EDW modelling tool recommendations for BW

  • I am trying to use the liquify tool for the first time. I created a new document (RGB/8) and before I place my photo, the liquify option is available. After I place the photo, the liquify option disappears. What am I doing wrong?

    I am trying to use the liquify tool for the first time. I created a new document (RGB/8). Before I place my photo, the liquify option is available. After I place the photo, the liquify option disappears. What am I doing wrong?

    What am I doing wrong?
    For one thing you forgot to mention the version of Photoshop you use.
    Did you place the image as a Smart Object? Liquify got Smart-capabilities with Photoshop CC.

  • I am about to buy my first Macbook Pro, should I wait for the possibility for a 2015 macbook, or just get the most recent model currently? (9-22-14)

    I am about to buy my first Macbook Pro, should I wait for the possibility for a 2015 macbook, or just get the most recent model currently? (9-22-14)

    No one knows if there will be a new model and if so, when that would be. However, there always will be something bigger, better, and newer around the corner, so you'd be waiting forever.
    Buy it when you want or need it.
    FWIW, here are the specs of the latest models (which happen to be mid 2014):
    Apple - Support - Technical Specifications

  • First PKGBUILD: Chirp

    Since it's my first time, I figured I'd post here for comments before uploading to AUR
    PKGBUILD
    # Maintainer: Nicholas Tryon (KC2YTG) <dhraak at gmail dot com>
    pkgname=chirp
    pkgver=0.2.2
    pkgrel=1
    pkgdesc="GUI tool for programming ham radios; supports a large number of makes and models"
    arch=('any')
    url="http://chirp.danplanet.com/"
    license=('GPL')
    depends=('python2-lxml' 'python2-pyserial' 'desktop-file-utils')
    options=(!emptydirs)
    install=$pkgname.install
    source=("http://chirp.danplanet.com/download/$pkgver/$pkgname-$pkgver.tar.gz")
    md5sums=('0ffcdac065a4471de70b4a0daf90f65c')
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    python2 setup.py install --root="$pkgdir/" --optimize=1
    # vim:set ts=2 sw=2 et:
    chirp.install
    post_install() {
    update-desktop-database -q
    post_remove() {
    update-desktop-database -q
    # vim:set ts=2 sw=2 et:
    I got rid of all the namcap errors and such, but I'd still like to make sure I got everything right and proper.
    (and if I hadn't loaned out my radio's programming cable, I could actually test out the program itself)

    Looks good. Just FYI, to have $srcdir in 'cd "$srcdir/$pkgname-$pkgver"' is not required anymore. 'cd "$pkgname-$pkgver"' would do just fine.

Maybe you are looking for