8000 Merge pull request #5 from pythonnet/master · trinco-cn1/pythonnet@3a8ecf1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a8ecf1

Browse files
author
denfromufa
authored
Merge pull request pythonnet#5 from pythonnet/master
latest
2 parents 66691ff + 44973c6 commit 3a8ecf1

File tree

150 files changed

+8264
-8574
lines changed

Some content is hidden

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

150 files changed

+8264
-8574
lines changed

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sudo: required
12
language: python
23
python:
34
- 2.6
@@ -6,14 +7,14 @@ python:
67
- 3.4
78
- 3.5
89
before_install:
9-
- sudo apt-get install software-properties-common
1010
- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"
11-
- sudo apt-get -qq update
12-
- sudo apt-get -qq install mono-devel mono-gmcs mono-xbuild nunit-console
13-
- sudo mozroots --import --machine --sync
14-
- yes | sudo certmgr -ssl -m https://go.microsoft.com
15-
- yes | sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
16-
- yes | sudo certmgr -ssl -m https://nuget.org
11+
- sudo apt-get install software-properties-common
12+
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
13+
- echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.2.4.4 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
14+
- echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
15+
- sudo apt-get update
16+
- sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono nunit-console
17+
1718
install:
1819
- pip install six
1920
- pip install pycparser

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ written, documented and tested pull requests are encouraged.
1414
## Making Changes
1515

1616
* Create a topic branch from where you want to base your work.
17-
* This is usually the develop branch.
17+
* This is usually the master branch.
1818
* Only target release branches if you are certain your fix must be on that
1919
branch.
20-
* To quickly create a topic branch based on develop; `git checkout -b
21-
fix/develop/my_contribution develop`. Please avoid working directly on the
22-
`master` branch.
20+
* To quickly create a topic branch based on master; `git checkout -b
21+
fix/develop/my_contribution master`. Please avoid working directly on the
22+
`master` branch for anything other than trivial changes.
2323
* Make commits of logical units.
2424
* Check for unnecessary whitespace with `git diff --check` before committing.
2525
* Make sure your commit messages are in the proper format.
@@ -29,7 +29,7 @@ written, documented and tested pull requests are encouraged.
2929

3030
## Submitting Changes
3131

32-
* Push your changes to a topic branch in your fork of the repository.
32+
* Merge your topic branch into master and push to your fork of the repository.
3333
* Submit a pull request to the repository in the pythonnet organization.
3434
* After feedback has been given we expect responses within two weeks. After two
3535
weeks we may close the pull request if it isn't showing any activity.

Python.Test.csproj

Lines changed: 0 additions & 190 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,20 @@ static void Main(string[] args)
4343
Console.WriteLine(sin(5));
4444
double c = np.cos(5) + sin(5);
4545
Console.WriteLine(c);
46+
/* this block is temporarily disabled due to regression
4647
dynamic a = np.array(new List<float> { 1, 2, 3 });
4748
dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32));
4849
Console.WriteLine(a.dtype);
4950
Console.WriteLine(b.dtype);
5051
Console.WriteLine(a * b);
52+
*/
5153
Console.ReadKey();
5254
}
5355
}
5456
```
5557
outputs:
5658```
57-
1.0
59+
1.0
5860
-0.958924274663
5961
-0.6752620892
6062
float64

demo/helloform.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
# ===========================================================================
2-
# This software is subject to the provisions of the Zope Public License,
3-
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
4-
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
5-
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6-
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
7-
# FOR A PARTICULAR PURPOSE.
8-
# ===========================================================================
9-
101
import clr
2+
113
SWF = clr.AddReference("System.Windows.Forms")
124
print (SWF.Location)
135
import System.Windows.Forms as WinForms
@@ -31,7 +23,7 @@ def __init__(self):
3123
self.button.Size = Size(820, 20)
3224
self.button.TabIndex = 2
3325
self.button.Text = "Click Me!"
34-
26+
3527
# Register the event handler
3628
self.button.Click += self.button_Click
3729

@@ -41,7 +33,7 @@ def __init__(self):
4133
self.textbox.TabIndex = 1
4234
self.textbox.Size = Size(1260, 40)
4335
self.textbox.Location = Point(160, 24)
44-
36+
4537
# Add the controls to the form
4638
self.AcceptButton = self.button
4739
self.Controls.Add(self.button);
@@ -66,4 +58,3 @@ def main():
6658

6759
if __name__ == '__main__':
6860
main()
69-

demo/splitter.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
# ===========================================================================
2-
# This software is subject to the provisions of the Zope Public License,
3-
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
4-
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
5-
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6-
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
7-
# FOR A PARTICULAR PURPOSE.
8-
# ===========================================================================
9-
101
import clr
112
import System.Windows.Forms as WinForms
123
from System.Drawing import Color, Size, Point
@@ -28,7 +19,6 @@ def __init__(self):
2819
self.splitter2 = WinForms.Splitter()
2920
self.panel1 = WinForms.Panel()
3021

31-
3222
# Set properties of TreeView control.
3323
self.treeView1.Dock = WinForms.DockStyle.Left
3424
self.treeView1.Width = self.ClientSize.Width / 3
@@ -48,14 +38,14 @@ def __init__(self):
4838

4939
# Set properties of Panel's Splitter control.
5040
self.splitter2.Dock = WinForms.DockStyle.Top
51-
41+
5242
# Width is irrelevant if splitter is docked to Top.
5343
self.splitter2.Height = 3
54-
44+
5545
# Use a different color to distinguish the two splitters.
5646
self.splitter2.BackColor = Color.Blue
5747
self.splitter2.TabIndex = 1
58-
48+
5949
# Set TabStop to false for ease of use when negotiating UI.
6050
self.splitter2.TabStop = 0
6151

@@ -67,7 +57,7 @@ def __init__(self):
6757

6858
# Set TabStop to false for ease of use when negotiating UI.
6959
self.splitter1.TabStop = 0
70-
60+
7161
# Add the appropriate controls to the Panel.
7262
for item in (self.richTextBox1, self.splitter2, self.listView1):
7363
self.panel1.Controls.Add(item)
@@ -87,12 +77,11 @@ def Dispose(self):
8777
WinForms.Form.Dispose(self)
8878

8979

90-
9180
def main():
9281
app = Splitter()
9382
WinForms.Application.Run(app)
9483
app.Dispose()
9584

85+
9686
if __name__ == '__main__':
9787
main()
98-

0 commit comments

Comments
 (0)
0