Skip to main content

Posts

Showing posts with the label support

Pillow compile error clang: -Wno-error=unused-command-line-argument-hard-error-in-future fix

I have had a problem with compiling Pillow recently. the error was with Pillow/Pil compilation. pillow install error clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error- in -future] Apple updated command line tools. So the cc command was updated too. $ gcc --version Configured with : --prefix= /Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang- 503.0 . 38 ) (based on LLVM 3.4 svn) Target: x86_64-apple-darwin13. 1.0 Thread model: posix The bug is in GCC. It is quite serious because those flags support will be dropped in future. Fortunately there is a worakround for now: export ARCHFLAGS= "-Wno-error=unused-command-line-argument-hard-error-in-future" It works for Pillow 2.4.0 and I can compile it with Apple LLVM 5.1 (That is current now), as of Xcode 5.1. Hope my findings will help someone.

Timezones. New in Django 1.4.

What and Why? Under Django version 1.4 all dates stored and displayed for a single timezone. The one that is specified in project.settings.TIME_ZONE . Now you gain ability to store dates in UTC and render it with timezone correction. Problems with localtime  bypass is an additional plus. They can happen once a year. For e.g. 31 of November 2012 in Russia. Time from 2:00am to 3:00am in fact goes by twice. It may not be a problem for 99% of users. But it can become a nightmare for billing systems. So it's better to store time in UTC and display with user Time Zone correction. So "02:15am 31 November 2012" will become " 2012-10-30T22:15:00+04:00" and "2010-10-30T23:15:00+03:00" that is so handy for programmers ;). Concepts datetime objects in Python support timezones with attribute tzinfo . If this attribute is filled out it is called "timezone-aware", otherwise it's "naive" date. Django uses timezone-aware date...

Django: Instalation of Dev environment on a clear Lion Mac OS X

Like lots of Apple fans around the world I've finally decided to upgrade my OS to Lion release. I have bought a new laptop and it was the case. I've waited for a weekend to prepared myself for sex. And it was it. Now I want to share my experience with you guys. For you not to spend to much time on those issues, I've did. Anyway what I'm usually using is a Fresh 2.7 Python , Django , PIL , virtualenv and many many minor tools which exceed scopes of this article. I also use Eclipse IDE for Python Dev. So all this I had to install and make spinning till monday. If anybody tells me that Macs do not have good tools for this. He will not be right. Maybe there some itches and scratches of head about: "Why is not those things working" or "Why do they work not as preferred". But there always is a good "Googled" decision to handle that. Anyway lets go to installing stuff. Short brief Plan of out work: 1. Install Apple Development SDK + ...