CSSTidy 快把我逼疯了!

发布于 2024-07-30 05:06:57 字数 615 浏览 3 评论 0原文

我使用的是 OS X + Python 2.6 + django 1.1。

我已经尝试了网上所有可能的解决方案,即

http://thingsilearned.com/2009/01/02/installing-csstidy-and-scons-on-os-x-or-linux/

尝试使用python 2.5、2.4 apple- 后我无法解决此错误

python ..安装 scons $ /usr/local/bin/scons

scons: *** 找不到 SConstruct 文件 。 文件“/Library/Python/2.5/site-packages/SCons/Script/Main.py”,第829行,在_main中

我需要csstidy来进行django-compress(是的,我可以关闭该功能,但为什么?)我的意思是维护者必须看到一些价值才能将其默认,他更清楚。

不幸的是没有 csstidy 的端口...

I am on OS X + Python 2.6 + django 1.1.

I have tried all possible solution available on the net i.e.

http://thingsilearned.com/2009/01/02/installing-csstidy-and-scons-on-os-x-or-linux/

tried with python 2.5, 2.4 apple-python.. I just can't go past this error after installing scons

$ /usr/local/bin/scons

scons: *** No SConstruct file found.
File "/Library/Python/2.5/site-packages/SCons/Script/Main.py", line 829, in _main

I need csstidy for django-compress (yes I can turn that function off but why?) I mean the maintainer must see some value to have it in default and he knows better.

Unfortunately there is no port for csstidy...

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

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

发布评论

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

评论(2

岛徒 2024-08-06 05:06:57

不知道你是否放弃了,或者是否解决了。

对于任何在构建 CSSTidy 时仍然遇到困难的人,这是我的解决方案。 如果您按照上面链接的 URL 中的教程进行操作,就会发现其中存在一个可怕的错误,直到大约一个小时后我才意识到。

$ wget http://downloads.sourceforge.net/csstidy/csstidy-source-1.4.zip?modtime=1184828155&big_mirror=0  
$ unzip csstidy-source-1.4.zip  
$ cd csstidy <<-- THIS IS WRONG. SConstruct isn't here. D:
$ scons  
$ sudo cp release/csstidy/csstidy /usr/local/bin/

作者遇到的错误与 --standard-lib 标志无关。 当您解压缩时,文件不会像tar通常那样放入子目录中。 因此,神奇地丢失的 SConstruct 文件实际上位于 csstidy 上面的目录中,无论您首先运行 unzip 的位置。

发现这一点后,我看到了 SConstruct 文件,并能够通过运行 scons 来构建它。

Don't know if you managed to give up or not, or if you solved it.

For anybody who is still having trouble building CSSTidy, here was my solution. If you follow the tutorial in the URL linked above, there is one horrible error in it that I didn't realize until about an hour later.

$ wget http://downloads.sourceforge.net/csstidy/csstidy-source-1.4.zip?modtime=1184828155&big_mirror=0  
$ unzip csstidy-source-1.4.zip  
$ cd csstidy <<-- THIS IS WRONG. SConstruct isn't here. D:
$ scons  
$ sudo cp release/csstidy/csstidy /usr/local/bin/

The errors the author ran into had nothing to do with the --standard-lib flag. When you unzip, the files don't get put into a subdirectory like tar usually does. So the SConstruct file that's magically missing is actually in the directory above csstidy, wherever you ran unzip in the first place.

Once I found that out, I saw the SConstruct file and was able to build it by running scons.

南汐寒笙箫 2024-08-06 05:06:57

如果您只想构建 csstidy 并且不关心增量构建,只需执行以下操作:

g++ *.cpp -o csstidy

If you just want to build csstidy and don't care about incremental builds, just do this:

g++ *.cpp -o csstidy

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