Discussion:
[BitPim-devel] local windows builds & testing from source
sod/sgt-d
2006-04-24 14:13:07 UTC
Permalink
hello everyone.

i really don't want to bug anyone here about this stuff, but i'm not sure
where to turn.

i am trying to get my computer setup 100% (or as close as possible) so that
i can make local builds of bitpim directly from the source.

currently i think i am pretty close.

problem #1:

i would like to get pycrypto-2.0.1 and paramiko-1.5.4 installed properly so
that i can have support for bitfling, but i keep getting errors like this:

c:\keep\pycrypto-2.0.1>python setup.py install
running install
running build
running build_py
running build_ext
error: Python was built with version 6 of Visual Studio, and extensions need
to
be built with the same version of the compiler, but it isn't installed.

do i need full blown m$ c++ or is there something i can download to satisfy
this "visual studio 6" requirement? i've spent several hours hunting and
trying different things such as msys, without any positive results.
everything else installed perfectly, just having problems with pycrypto and
paramiko.
problem #2:
i am not exactly sure how to get create a local build... something that
would run the iss script to generate a windows installer that i can run and
test locally. in other words, if i ever make changes and want to submit my
work to the trunk, i would want to make sure that my code worked locally
first.
any help would be greatly appreciated.
i will keep looking.
thanks in advance,
-darren
Simon C
2006-04-24 14:45:30 UTC
Permalink
Post by sod/sgt-d
i am not exactly sure how to get create a local build...
something that would run the iss script to generate a windows
installer that i can run and test locally. in other words,
if i ever make changes and want to submit my work to the
trunk, i would want to make sure that my code worked locally first.
any help would be greatly appreciated.
You don't have to build to test, you can run from source by typing "python
bp.py" on the command line in the src directory. I'd recommend doing this
before you try to build a distribution package.

To build a package there are two scripts to run, the first only has to be
run once.
packages/buildmodules.py
Buildrelease/makedist.py

You have to install a handful other pieces to get the build to work, pieces
you don't need to run from the source. I don't know of a list but you can
figure it out from the errors you get and by looking at the source.
Post by sod/sgt-d
i will keep looking.
thanks in advance,
-darren
Stephen Wood
2006-04-24 14:49:49 UTC
Permalink
Post by sod/sgt-d
i am trying to get my computer setup 100% (or as close as possible) so
that i can make local builds of bitpim directly from the source.
Do you really need to make builds, or just run from source? Setting up to
make builds is a little tricky (at least for me) without a compiler, but
possible.
Post by sod/sgt-d
i would like to get pycrypto-2.0.1 and paramiko-1.5.4 installed properly
so that i can have support for bitfling, but i keep getting errors like
Look for a prebuilt windows binary for pycrypto. I believe that Paramiko
should then install once you have the pycrpto binary installed. No compiler
should be required.
.
Post by sod/sgt-d
i am not exactly sure how to get create a local build... something that
would run the iss script to generate a windows installer that i can run
and test locally. in other words, if i ever make changes and want to
submit my work to the trunk, i would want to make sure that my code worked
locally first.
Unless you want to distribute builds to others, it is sufficent to run
BitPim from source (python bp.py).


--
Stephen Wood

One of the "Steves" of Project Steve at http://www.ncseweb.org/.
sod/sgt-d
2006-04-24 15:55:04 UTC
Permalink
Post by Simon C
You don't have to build to test, you can run from source by typing "python
bp.py" on the command line in the src directory. I'd recommend doing this
before you try to build a distribution package.

i can run it and test locally from source (bp.py) without any problems at
all really... well, there is one minor tick: i get an exception each time
i connect my vx9800 and bitpim detects it. this of course is not a problem
to me since my installed bitpim doesn't raise an exception.
Post by Simon C
To build a package there are two scripts to run, the first only has to be
run once.
packages/buildmodules.py
Buildrelease/makedist.py

when i try to run packaging/buildmodules.py it complains about tons of
missing .h files, i will look around and see what i can find. eg: string.h:
No such file or directory.
Post by Simon C
You have to install a handful other pieces to get the build to work,
pieces
you don't need to run from the source. I don't know of a list but you can
figure it out from the errors you get and by looking at the source.

thanks for all of your help, i will keep plugging away at it!

-darren
sod/sgt-d
2006-04-24 15:55:39 UTC
Permalink
Post by Stephen Wood
Do you really need to make builds, or just run from source? Setting up to
make builds is a little tricky (at least for me) without a compiler, but
possible.

i would like to get to that point, eventually.
Post by Stephen Wood
Look for a prebuilt windows binary for pycrypto. I believe that Paramiko
should then install once you have the pycrypto binary installed. No
compiler should be required.

god, thank you for getting me to look (again) for a pre-built version (for
python 2.3) -
http://twisted.sourceforge.net/contrib/pycrypto-2.0.win32-py2.3.exe - this
file did the trick. once this was installed, pamariko installed flawlessly.
Post by Stephen Wood
Unless you want to distribute builds to others, it is sufficient to run
BitPim from source (python bp.py).
i am trying to make local builds for other geek testers like myself on a
local network, so yes, i would like to be able to build my own exe's.

i would like to stay as "vanilla" as possible, using the ISS file for the
installer script, but i could make my own with nsis or something else...
the real problem though is that i would need to compile everything so i end
up with bitpim.exe and bitfling.exe, and everything that would normally be
included in the package.

thanks again,

-darren
Roger Binns
2006-04-25 03:23:23 UTC
Permalink
Post by Stephen Wood
Post by Stephen Wood
Do you really need to make builds, or just run from source? Setting up to
make builds is a little tricky (at least for me) without a compiler, but
possible.
If you want a compiler, then install MinGW - it is what I use.

Download this http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
and put the resulting directory in your path.
Post by Stephen Wood
i would like to stay as "vanilla" as possible, using the ISS file for the
installer script,
You should be able to run buildrelease\makedist.py and the right thing
will happen. If it doesn't, it is a bug and I will fix it. I'd
recommend editting src\version.py first and changing the line that
begins vendor="..." to be vendor="yourname"
Post by Stephen Wood
but i could make my own with nsis or something else...
Why would you need to do that?
Post by Stephen Wood
the real problem though is that i would need to compile everything so i end
up with bitpim.exe and bitfling.exe, and everything that would normally be
included in the package.
In addition to the packages listed in the developer page, you will need a
number of others. The makedist.py script will check for them and their
version so you can keep running it until it is happy.

Roger
sod/sgt-d
2006-04-25 13:14:07 UTC
Permalink
Roger,

thanks a ton for your help. i think i am getting very close!

i seem to be stuck on the jarow module...

c:\bitpim>python buildrelease\makedist.py

Using package file src/package.py
py2exe version OK
Innosetup OK
=== Sanity check ===
python version OK
wxPython version OK
wxPython is unicode build OK
pycrypto version OK
paramiko version OK
bitfling OK
pyserial OK
apsw OK
sqlite OK
jaro/winkler string matcher Using (slow) Python version of Jaro/Winkler.
Build
C module in native/strings.
Traceback (most recent call last):
File "buildrelease\makedist.py", line 594, in ?
pkg.sanitycheck() # theirs
File "c:\bitpim\src\package.py", line 82, in sanitycheck
import native.strings.jarow
ImportError: No module named jarow

Variables by last 8 frames, innermost last

Frame ? in buildrelease\makedist.py at line 594
eh = <function eh at 0x00A5F430>
sanitycheck = <function sanitycheck at 0x00A5F270>
recursiveglob = <function recursiveglob at 0x00A0BB30>
getconfig = <function getconfig at 0x00A5F330>
formatexception = <function formatexception at 0x00A5F2B0>
windowsbuild = <function windowsbuild at 0x00A5F1B0>
makeconfig = <function makeconfig at 0x00A5F3F0>
PATH_CXFREEZE = '/opt/cx_Freeze-3.0.2'
rmrf = <function rmrf at 0x00A0BB70>
manifest_template = '\n<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>\
n<assembly xmlns="urn
setconfig = <function setconfig at 0x00A5F370>
RT_MANIFEST = 24
__file__ = 'buildrelease\\makedist.py'
run = <function run at 0x00A0BAF0>
linuxrpmbuild = <function linuxrpmbuild at 0x00A5F1F0>
saveconfig = <function saveconfig at 0x00A5F3B0>
opd = <function dirname at 0x009B59F0>
opb = <function basename at 0x009B59B0>
__name__ = '__main__'
opj = <function join at 0x009B5870>
dosubs = <function dosubs at 0x00A5F170>
__doc__ = 'Builds a binary distribution of a Python program\n\nThis
cod
e runs on Windows,
WINXP_MANIFEST = '\n<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>\n<
assembly xmlns="urn
clean = <function clean at 0x00A5F030>
macbuild = <function macbuild at 0x00A5F230>
PATH_INNOSETUP = 'c:\\program files\\inno setup 5\\compil32.exe'
setupconfig = <function setupconfig at 0x00A5F2F0>

Frame sanitycheck in c:\bitpim\src\package.py at line 82
ver = '3.2.7'
expect = '1.4 (oddish)'

c:\bitpim>

c:\bitpim\src\native\strings>python setup.py build --compile=mingw32

running build
running build_ext
building 'jarow' extension
writing build\temp.win32-2.3\Release\jarow.def
c:\bin\mingw\bin\gcc.exe -mno-cygwin -shared -s
build\temp.win32-2.3\Release\jar
ow.o build\temp.win32-2.3\Release\jarow.def -Lc:\python23\libs
-Lc:\python23\PCB
uild -lpython23 -o build\lib.win32-2.3\jarow.pyd
build\temp.win32-2.3\Release\jarow.o(.text+0x7d0):jarow.c: undefined
reference t
o `_imp__PyString_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x7de):jarow.c: undefined
reference t
o `_imp__PyString_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x807):jarow.c: undefined
reference t
o `_imp__PyUnicode_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x815):jarow.c: undefined
reference t
o `_imp__PyUnicode_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x84b):jarow.c: undefined
reference t
o `_imp__PyString_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x859):jarow.c: undefined
reference t
o `_imp__PyUnicode_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x8ba):jarow.c: undefined
reference t
o `_imp__PyUnicode_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x8c8):jarow.c: undefined
reference t
o `_imp__PyString_Type'
build\temp.win32-2.3\Release\jarow.o(.text+0x937):jarow.c: undefined
reference t
o `_imp__PyExc_TypeError'
error: command 'gcc' failed with exit status 1

c:\bitpim\src\native\strings>

thanks again for your help!!!

-darren

Loading...