如何在 Mac OS X 上安装 scons

发布于 2024-07-29 08:16:42 字数 150 浏览 6 评论 0原文

你能告诉我如何在 MacOSX 上安装 scons 吗?

我没有看到 http://www.scons.org/ 指定的 mac 下载,

谢谢。

Can you please tell me how can I install scons on MacOSX?

I don't see a mac specified download from http://www.scons.org/

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

扎心 2024-08-05 08:16:42

MacPorts 的替代方案是使用 HomeBrew,您只需

brew install scons

An alternative to MacPorts would be to use HomeBrew, where you'd just to

brew install scons
天暗了我发光 2024-08-05 08:16:42

下载 tarball,然后参阅用户指南的第一章 构建和安装 SCons。 简而言之:

# cd scons-1.2.0
# python setup.py install

Download the tarball and then refer to the first chapter of the user guide, Building and Installing SCons. In short:

# cd scons-1.2.0
# python setup.py install
柒七 2024-08-05 08:16:42

安装 MacPorts,然后在终端(应用程序 > 实用程序 > Terminal.app)中键入:

sudo port install scons

此命令将自动为您下载并安装 scons。 MacPorts 要求您安装开发人员工具,因此如果没有安装,您将需要下载并安装 Xcode 3 DVD

注 1:Xcode 2.5 是可在 Mac OS X Tiger 上运行的最新 Xcode 版本。

注意 2:如果您还没有安装 MacPorts,这可能看起来非常痛苦。 但是,您确实应该走这条路,因为 MacPorts 可以轻松更新已安装的软件,它会自动管理软件之间的依赖关系,并且可以更轻松地将来安装其他软件包。

Install MacPorts, then at the Terminal (Applications > Utilities > Terminal.app), type:

sudo port install scons

This command will automatically download and install scons for you. MacPorts requires that you have the developer tools installed, so if you don't, you will need to download and install the Xcode 3 DVD.

NOTE 1: Xcode 2.5 is the last version of Xcode that will work on Mac OS X Tiger.

NOTE 2: This may seem awfully painful if you don't already have MacPorts installed. However, you really should go this route, as MacPorts makes it easy to update installed software, it automatically manages dependencies between software, and it makes it easier to install other packages in the future.

蒲公英的约定 2024-08-05 08:16:42

如果您有Python setuptools,以下将从sourceforge安装scons-1.2.0:

easy_install scons

但请记住人们使用安装工具提出的问题

另外,请记住这个问题和关于用于隔离 Python 环境的 virtualenv 和 pip 的答案。

If you have the Python setuptools, the following will install scons-1.2.0 from sourceforge:

easy_install scons

But bear in mind the issues people raise with setuptools.

Also, keep in mind this question and the answers about virtualenv and pip for isolating Python environments.

回梦 2024-08-05 08:16:42

还有我编写的 Mac OS X 上 SCons 的 GUI 安装程序,可以在此处下载:

https:/ /github.com/rviney/scons-mac-installer

There is also a GUI installer for SCons on Mac OS X that I wrote available for download here:

https://github.com/rviney/scons-mac-installer

不如归去 2024-08-05 08:16:42

由于版本 2.3.0 SCons 无需安装即可工作:

# get the source and switch to stable 2.3.0 version
hg clone https://bitbucket.org/scons/scons/ -r 2.3.0

# make sure to use Python 2 for now
python scons/src/scripts/scons.py

从源代码运行 2.3.0 时,SCons.__version__ 设置不正确,因此如果您可以的话,EnsureSConsVersion() 可能会失败。

Since version 2.3.0 SCons should work without installing:

# get the source and switch to stable 2.3.0 version
hg clone https://bitbucket.org/scons/scons/ -r 2.3.0

# make sure to use Python 2 for now
python scons/src/scripts/scons.py

When running 2.3.0 from source, the SCons.__version__ is not set correctly, so EnsureSConsVersion() will likely to fail if that's ok for you.

命比纸薄 2024-08-05 08:16:42

通过 pipx

  1. 安装 pipx (如果尚未完成)
brew install pipx
pipx ensurepath
  1. pipx install scons
  2. 安装手册页并配置 manpath
cp ~/.local/pipx/venvs/scons/scons*.1 ~/.local/share/man/man1/

插入

MANPATH=$HOME/.local/share/man/:$MANPATH;

到 bashrc/zshrc 中。

pipx 的优点

在隔离环境中安装和运行 Python 应用程序。 (请参阅xkcd 对 Python 依赖项的看法)。

Installation via pipx

  1. Install pipx (if not yet done)
brew install pipx
pipx ensurepath
  1. pipx install scons
  2. Install manpages and configure manpath
cp ~/.local/pipx/venvs/scons/scons*.1 ~/.local/share/man/man1/

Insert

MANPATH=$HOME/.local/share/man/:$MANPATH;

into bashrc/zshrc.

Advantages of pipx

Install and run Python applications in isolated environments. (see xkcd's take on Python dependencies).

梦里兽 2024-08-05 08:16:42

下拉 SCons 源并将其放入 /Library/Python/XX/ 中。 确保你有这样的目录结构: /Library/Python/XX/SCons/init.py

记住,导入搜索模块,并且 /Library/Python/XXX 默认在搜索路径中。

pull down SCons source and put it in /Library/Python/X.X/. Make sure you have the dir structure like this: /Library/Python/X.X/SCons/init.py

remember, import searches for modules, and /Library/Python/XXX is by default in the search path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文