FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

consolidated config environments · djoyce82/pythonnet@5e052ef · GitHub

Repository navigation

Commit 5e052ef

Browse files
committed
consolidated config environments
1 parent 1126819 commit 5e052ef

69 files changed

Lines changed: 4603 additions & 1657 deletions

Some content is hidden

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

‎.dockerignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.dockerignore
2+
.env
3+
.git
4+
.gitignore
5+
.vs
6+
.vscode
7+
docker-compose.yml
8+
docker-compose.*.yml
9+
*/bin
10+
*/obj

‎DockerTest/DockerTest.csproj‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
6+
<Configurations>Debug;Release</Configurations>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\src\runtime\Python.Runtime.15.csproj" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<None Update="requirements.txt">
15+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16+
</None>
17+
</ItemGroup>
18+
19+
</Project>

‎DockerTest/Dockerfile‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM microsoft/dotnet:2.1-runtime AS base
2+
RUN apt-get update -y && apt-get install python3 -y && apt-get install python3-pip -y
3+
RUN ldconfig
4+
5+
WORKDIR /app
6+
7+
FROM microsoft/dotnet:2.1-sdk AS build
8+
WORKDIR /src
9+
COPY DockerTest/DockerTest.csproj DockerTest/
10+
RUN dotnet restore DockerTest/DockerTest.csproj
11+
COPY . .
12+
WORKDIR /src/DockerTest
13+
RUN dotnet build DockerTest.csproj -c ReleasePy3 -o /app
14+
15+
FROM build AS publish
16+
RUN dotnet publish DockerTest.csproj -c ReleasePy3 -o /app
17+
18+
FROM base AS final
19+
WORKDIR /app
20+
COPY --from=publish /app .
21+
22+
RUN pip3 install --no-cache-dir -r requirements.txt
23+
24+
ENV LD_LIBRARY_PATH /usr/lib/python3.5/config-3.5m-x86_64-linux-gnu
25+
26+
ENTRYPOINT ["dotnet", "DockerTest.dll"]

‎DockerTest/Program.cs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Python.Runtime;
2+
using System;
3+
4+
namespace DockerTest
5+
{
6+
class Program
7+
{
8+
static void Main(string[] args)
9+
{
10+
Console.WriteLine("Hello World!");
11+
12+
var state = Py.GIL();
13+
var sys = Py.Import("sys");
14+
var np = Py.Import("numpy");
15+
}
16+
}
17+
}

‎DockerTest/requirements.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
numpy

‎docker-compose.dcproj‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|AnyCPU">
5+
<Configuration>Debug</Configuration>
6+
<Platform>AnyCPU</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|AnyCPU">
9+
<Configuration>Release</Configuration>
10+
<Platform>AnyCPU</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<ProjectVersion>2.1</ProjectVersion>
15+
<DockerTargetOS>Linux</DockerTargetOS>
16+
<ProjectGuid>7b1fe155-4e45-42a7-9a4b-0a19f12d89ac</ProjectGuid>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<None Include="docker-compose.override.yml">
20+
<DependentUpon>docker-compose.yml</DependentUpon>
21+
</None>
22+
<None Include="docker-compose.yml" />
23+
<None Include=".dockerignore" />
24+
</ItemGroup>
25+
</Project>

‎docker-compose.override.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version: '3.4'

‎docker-compose.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: '3.4'
2+
3+
services:
4+
dockertest:
5+
image: ${DOCKER_REGISTRY}dockertest
6+
build:
7+
context: .
8+
dockerfile: DockerTest/Dockerfile

‎pythonnet.15.sln‎

Lines changed: 173 additions & 173 deletions
Large diffs are not rendered by default.

‎src/clrmodule/clrmodule.15.csproj‎

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PropertyGroup>
66
<TargetFrameworks>net40</TargetFrameworks>
77
<Platforms>x64;x86</Platforms>
8-
<Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
8+
<Configurations>Debug;DebugPY3;Release;ReleasePY3</Configurations>
99
<RootNamespace>clrmodule</RootNamespace>
1010
<AssemblyName>clrmodule</AssemblyName>
1111
<PackageId>clrmodule</PackageId>
@@ -46,29 +46,16 @@
4646
<Optimize>true</Optimize>
4747
<DebugType>pdbonly</DebugType>
4848
</PropertyGroup>
49-
50-
<PropertyGroup Condition=" '$(Configuration)' == 'DebugMono'">
51-
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants>
52-
</PropertyGroup>
53-
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMono'">
54-
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants>
55-
</PropertyGroup>
56-
<PropertyGroup Condition=" '$(Configuration)' == 'DebugWin'">
49+
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
5750
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2;TRACE;DEBUG</DefineConstants>
5851
</PropertyGroup>
59-
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWin'">
52+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
6053
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON2</DefineConstants>
6154
</PropertyGroup>
62-
<PropertyGroup Condition=" '$(Configuration)' == 'DebugMonoPY3'">
63-
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants>
64-
</PropertyGroup>
65-
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseMonoPY3'">
66-
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants>
67-
</PropertyGroup>
68-
<PropertyGroup Condition=" '$(Configuration)' == 'DebugWinPY3'">
55+
<PropertyGroup Condition="'$(Configuration)'=='DebugPY3'">
6956
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3;TRACE;DEBUG</DefineConstants>
7057
</PropertyGroup>
71-
<PropertyGroup Condition=" '$(Configuration)' == 'ReleaseWinPY3'">
58+
<PropertyGroup Condition="'$(Configuration)'=='ReleasePY3'">
7259
<DefineConstants Condition="'$(CustomDefineConstants)' == ''">$(DefineConstants);PYTHON3</DefineConstants>
7360
</PropertyGroup>
7461

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL