Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msabramo/_pymssql_2013-09-09
Fork of https://code.google.com/p/pymssql/
https://github.com/msabramo/_pymssql_2013-09-09
Last synced: about 1 month ago
JSON representation
Fork of https://code.google.com/p/pymssql/
- Host: GitHub
- URL: https://github.com/msabramo/_pymssql_2013-09-09
- Owner: msabramo
- License: lgpl-2.1
- Created: 2012-12-02T05:37:42.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-02T01:20:11.000Z (almost 12 years ago)
- Last Synced: 2024-05-09T20:37:42.975Z (8 months ago)
- Language: C
- Size: 8.62 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
Building
========To build pymssql you should have:
* python >= 2.5 (including development files, i.e. pyton-dev packages)
* Cython >= 0.15
* FreeTDS >= 0.91MinGW
=====Add to the above requirements:
* MinGW
then you can run:
python setup.py build -c mingw32
which will build pymssql in the normal python fashion.
MS Visual C++
=============Environment Setup:
------------------The commands below should be ran inside a Visual Studio command prompt
or a command prompt window where the vcsvars*.bat file has been previously
run so it can set the needed environment vars.Building FreeTDS:
-----------------Build FreeTDS from the current or stable tarball:
http://ibiblio.org/pub/Linux/ALPHA/freetds/current/
http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/Use nmake (included with VS C++) to build FreeTDS. To do that,
Define in the environment or on the command line:
1. CONFIGURATION = debug/release
2. PLATFORM = win32/x64These will determine what is built and where outputs are placed.
Example invocations:
nmake.exe -f Nmakefile -nologo PLATFORM=win32 CONFIGURATION=debug
nmake.exe -f Nmakefile -nologo build-win32dFixing build errors: I ran into a couple build errors when using VS 2008, see
the following links for resolutions.http://www.freetds.org/userguide/osissues.htm
http://lists.ibiblio.org/pipermail/freetds/2010q4/026343.htmlWhen this is done, the follwing files should be available (dependening on
CONFIGURATION and PLATFORM) used above:src\dblib\\\db-lib.lib
src\tds\\\tds.libfor example:
src\dblib\win32\release\db-lib.lib
src\dblib\win32\release\tds.libThose files should then be copied to:
\freetds\vs2008_\lib\
for example:
\freetds\vs2008_32\lib\
\freetds\vs2008_64\lib\The location obviously depends on whether you are wanting a 32 or 64 bit
build.*NOTE*: This process is currently only tested with Visual Studio 2008 targeting a
32-bit build. If you run into problems, please post to the mailing list.Then you can simply run:
python setup.py build
or other setup.py commands as needed.
Unix
====To build on Unix you must also have:
* gcc
Then you can simply run:
python setup.py build
or other setup.py commands as needed.
Testing
=======*** ALL DATA IN TESTING DBS WILL BE DELETED !!!! ***
You will need to install two additional packages for testing:
easy_install nose SQLAlchemy
You should build the package with:
python setup.py develop
You need to setup a tests.cfg file in tests/ with the correct DB connection
information for your environement:cd tests/
cp tests.cfg.tpl tests.cfg
vim|emacs|notepad tests.cfgTo run the tests:
cd tests/
nosetestsWhich will go through and run all the tests with the settings from the DEFAULT
section of tests.cfg.To run with a different tests.cfg section:
nosetests --pymssql-section=
example:
nosetests --pymssql-section=AllTestsWillRun
to avoid slow tests:
nosetests -a '!slow'
to select specific tests to run:
nosetests test_types.py
nosetests test_types.py test_sprocs.py
nosetests test_types.py:TestTypes
nosetests test_types.py:TestTypes.test_image