Skip to content

Commit 035b7ad

Browse files
committed
1 parent 78d991b commit 035b7ad

File tree

126 files changed

+2777
-684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+2777
-684
lines changed

pythonnet/VS_README.txt

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
1-
I'm not the original author of Python for .Net, and when I first tried to compile it with VS2005, I had a lot of troubles, so I thought you might want to know how I managed to do it.
1+
Visual Studio 2005
2+
==================
23

3-
- Create a VS Solution.
4-
- Add a new project "PythonRuntime"
5-
- Add all files rom src/runtime in your project.
6-
- Replace the Properties.AssemblyInfo.cs with the src/runtime/assemblyinfo.cs file.
7-
- In importhook.cs, change the "ClrModule" reference to "ModuleObject". (I'm not sure if it breaks something somewhere, but it doesn't seem to break anything on the embedded side).
8-
- You should then be able to compile it.
4+
pythonnet contains a new solution file for Visual Studio 2005: pythonnet.sln
5+
It should make development under Windows much easier since you don't have to
6+
install MSys or Cygwin to run the makefile.
97

10-
I only use Python for .Net to embed python, so I never tried, nor do I know how to compile CLR.dll.
8+
The solution file should work with the free VS .NET Express Edition.
119

12-
I added test units for the modification I made to the embedded side. They are in src\embed_tests. You need NUnit to run them.
10+
Available configurations
11+
------------------------
1312

14-
- Create a new project "UnitTests" in you previously created solution.
15-
- Add a reference to NUnit.framework
16-
- Add a reference to PythonRuntime
17-
- Compile
18-
- Open the nunit project and run it.
13+
Every configuration copies the dll, pdf and exe files to the root directory
14+
of the project.
1915

20-
Virgil Dupras
16+
* Release
17+
Builds Python.Runtime, Python.Tests, clr.pyd and python.exe. The console
18+
project starts a Python console
19+
20+
* Debug
21+
Same as Release but creates a build with debug symbols
22+
23+
* UnitTest
24+
Builds a Debug build. The console project invokes runtests.py instead of
25+
opening a Python shell.
26+
27+
* EmbeddingTest
28+
Builds Python.EmbeddingTests and its dependencies. The configuration
29+
requires the NUunit framework.
30+
31+
Python version
32+
--------------
2133

34+
You can switch the destination version by defining either PYTHON24 or PYTHON25
35+
inside the Python.Runtime project.
36+
37+
** Don't forget to force a rebuild after you have altered the setting! **
38+
39+
MS VS doesn't take changes to define into account.
40+
41+
42+
Thanks to Virgil Duprasfor his original VS howto!
43+
44+
Christian 'Tiran' Heimes

pythonnet/demo/helloform.py

100755100644
File mode changed.

pythonnet/demo/splitter.py

100755100644
File mode changed.

pythonnet/demo/wordpad.py

100755100644
File mode changed.

pythonnet/doc/TODO.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
TODO list
2+
=========
3+
4+
For PythonNet 2.0
5+
-----------------
6+
7+
* Implement support for ModulePropertyAttribute.
8+
9+
* Replace CLRModule.preload code with ModulePropertyAttribute specific code.
10+
11+
* Deprecate implicit loading of assemblies
12+
13+
* Add support for implicit calls to overloaded methods.
14+
OverloadedMethod[string, int]("egg", 42) works
15+
OverloadedMethod("egg", 42) does not under some circumstances work
16+
17+
* Debug failing unit tests under Mono and report them if they are caused
18+
by incompatibilities in Mono.
19+
20+
Future and nice-to-have features
21+
--------------------------------
22+
23+
* Add support for Python's debug builds. Debug builds have additional fields
24+
in the struct, extensive self testing and C assert() are enabled. Py_DEBUG
25+
implies Py_TRACE_REFS and Py_REF_DEBUG which enlarge the PyObject and
26+
PyVarObject based structs. The Py_INCREF and Py_DECREF macros have a larger
27+
payload as well. They keep track of the absolute number of references and
28+
do tests when an object is GCed.
29+
I've taken care of most of the incompatibilities but the Py_DEBUG build
30+
is still broken. Somehow tp_mro of wrapper_descriptor isn't a tuple.
31+
32+
* Support Python 2.6. The most important feature I was able to isolate is the
33+
PyType_FastSubclass macro and related TypeFlags in interops.cs.
34+
35+
* Let's talk to the Debian and Ubuntu maintainers for Python in order to convince
36+
them to build Python with --enable-shared. Ubuntu's Python is semi static and not
37+
linked against libpython2.x.so. This causes trouble with clr.so.
38+

pythonnet/doc/changes.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
11
Python for .NET Changes
22
-----------------------
33

4+
PythonNet 2.0 alpha 2
5+
---------------------------------------------------------------------------
6+
7+
- First work on Python 2.5 compatibility. The destination version can be
8+
set by defining PYTHON24 or PYTHON25. Python 2.6 compatibility is in
9+
work. [tiran]
10+
11+
- Added VS 2005 solution and project files including a UnitTest
12+
configuration which runs the unit test suite. [tiran]
13+
14+
- Enhanced unit test suite. All test cases are combined in a single
15+
test suite now. [tiran]
16+
17+
- Fixed bugs in generics support for all Python versions. [tiran]
18+
19+
- Fixed exception bugs for Python 2.5+. When compiled for Python 2.5+ all
20+
managed exceptions are based on Python's exceptions.Exception class.
21+
[tiran]
22+
23+
- Implemented a preload switch. Automatic preloading can be enabled by
24+
setting clr.preload to true. Preloading is automatically enabled for
25+
interactive Python shells and disabled in all other cases. [tiran]
26+
27+
- Added deprecation warnings for importing from CLR.* and the CLR module.
28+
[tiran]
29+
30+
- Implemented support for methods with variable arguments
31+
spam(params object[] egg) [tiran]
32+
33+
- Fixed Mono support by adding a custom marshaler for UCS-4 unicode,
34+
fixing a some ref counter bugs and creating a new makefile.mono.
35+
[tiran]
36+
37+
- Added a standard python extension to load the clr environment
38+
(src/monoclr). XXX DOES NOT WORK
39+
[tiran]
40+
41+
- Added yet another python prompt. This time it's a C application that
42+
embedds both Python and Mono. It may be useful as an example app for
43+
others and I need it to debug a nasty bug. [tiran]
44+
45+
- Implemented ModuleFunctionAttribute and added ForbidPythonThreadsAttribute.
46+
The latter is required for module functions which invoke Python methods.
47+
[tiran]
48+
49+
- Added clr.AddReference("assembly name"), clr.FindAssembly("name") and
50+
clr.ListAssemblies(verbose). [tiran]
51+
452
PythonNet 2.0 alpha 1
553
---------------------------------------------------------------------------
654

pythonnet/doc/index.html

100755100644
File mode changed.

pythonnet/doc/mono_config.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# copy this file to ~/.mono/config or add the dllmaps to the global
2+
# configuration file /etc/mono/config
3+
<configuration>
4+
<dllmap dll="python23" target="libpython2.3.so" os="!windows" />
5+
<dllmap dll="python23.dll" target="libpython2.3.so" os="!windows" />
6+
<dllmap dll="python24" target="libpython2.4.so" os="!windows" />
7+
<dllmap dll="python24.dll" target="libpython2.4.so" os="!windows" />
8+
<dllmap dll="python25" target="libpython2.5.so" os="!windows" />
9+
<dllmap dll="python25.dll" target="libpython2.5.so" os="!windows" />
10+
<dllmap dll="python26" target="libpython2.6.so" os="!windows" />
11+
<dllmap dll="python26.dll" target="libpython2.6.so" os="!windows" />
12+
</configuration>
13+

0 commit comments

Comments
 (0)