GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — install packages using nuget in setup.py · YelcoBot/pythonnet@b031afa

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .travis.yml
  • pythonnet
    • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.travis.yml‎

Copy file name to clipboardExpand all lines: .travis.yml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ before_install:
77
- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"
88
- sudo apt-get -qq update
99
- sudo apt-get -qq install mono-devel mono-gmcs mono-xbuild nunit-console
10+
- sudo mozroots --import --machine --sync
11+
- yes | sudo certmgr -ssl -m https://go.microsoft.com
12+
- yes | sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
13+
- yes | sudo certmgr -ssl -m https://nuget.org
1014
install:
1115
- cd pythonnet
1216
- python setup.py build_ext --inplace
Collapse file

‎pythonnet/setup.py‎

Copy file name to clipboardExpand all lines: pythonnet/setup.py
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ def build_extension(self, ext):
8181
if ext.name != "clr":
8282
return build_ext.build_extension(self, ext)
8383

84+
# install packages using nuget
85+
self._install_packages()
86+
8487
dest_file = self.get_ext_fullpath(ext.name)
8588
dest_dir = os.path.dirname(dest_file)
8689
if not os.path.exists(dest_dir):
@@ -164,6 +167,29 @@ def _build_monoclr(self, ext):
164167
debug=self.debug)
165168

166169

170+
def _install_packages(self):
171+
"""install packages using nuget"""
172+
nuget = os.path.join("tools", "nuget", "nuget.exe")
173+
use_shell = False
174+
if DEVTOOLS == "Mono":
175+
nuget = "mono %s" % nuget
176+
use_shell = True
177+
178+
for dir in os.listdir("src"):
179+
if DEVTOOLS == "Mono" and dir == "clrmodule":
180+
continue
181+
if DEVTOOLS != "Mono" and dir == "monoclr":
182+
continue
183+
184+
packages_cfg = os.path.join("src", dir, "packages.config")
185+
if not os.path.exists(packages_cfg):
186+
continue
187+
188+
cmd = "%s install %s -o packages" % (nuget, packages_cfg)
189+
self.announce("Installng packages for %s: %s" % (dir, cmd))
190+
check_call(cmd, shell=use_shell)
191+
192+
167193
class PythonNET_InstallLib(install_lib):
168194

169195
def install(self):

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.