Web Development

Add PHPUnit to MAMP 2.x, including PHP 5.4.4 for OSX 10.8

December 3rd, 2012 0 Comments

delete: /Applications/MAMP/bin/php/php5.4.4/conf/pear.conf
(delete or bak)

$ /Applications/MAMP/bin/php/php5.4.4/bin/pear channel-update pear.php.net
$ /Applications/MAMP/bin/php/php5.4.4/bin/pear upgrade pear
$ /Applications/MAMP/bin/php/php5.4.4/bin/pear channel-discover pear.phpunit.de
$ /Applications/MAMP/bin/php/php5.4.4/bin/pear channel-discover pear.symfony-project.com
$ /Applications/MAMP/bin/php/php5.4.4/bin/pear install phpunit/PHPUnit

make available in terminal:
$ mv /Applications/MAMP/bin/php/php5.4.4/bin/phpunit /usr/local/bin/phpunit

test:
type phpunit –version in Terminal
(you will see latest version of PHPUnit).

Note, if you need an older version of PHPUnit, like 3.6.x, you will indicate that when installing phpunit/PHPUnit-3.6.12

Run Python 2.7.3 and 3.3.0 on OSX Together

November 30th, 2012 0 Comments

Any Django developer has been using Python 2.7.x for some time now, but as Django 1.5 continues to move toward release, there will likely be a large number of developers officially moving to the Python 3.x track. You have to love how flexible Python is to work with, and this scenario is also evident of that.

You can run BOTH Python 2.7.3 and 3.3.x on OSX together, at the same time, and without conflict (not even in terminal). To accomplish this, just follow these simple steps:

(optional) Python should be installed by default, but if you like you can install the 64 bit version of Python 2.7.3 b downloading here and running the dmg. Be sure you CONTROL-CLICK the installer package, and choose to open with Installer (this way even OSX 10.8 systems will have no issues). Follow all the default prompts.

1. You can verify your Python installation in Terminal by simply typing python, which will output the current version and prompt, and close with exit()

2. Now download the 64 bit version of Python 3.3.x from here and running the dmg. Be sure you CONTROL-CLICK the installer package, and choose to open with Installer (this way even OSX 10.8 systems will have no issues). Follow all the default prompts.

BAM… you now have Python 3.3.x installed.

3. Now open a new Terminal and type python3, and you will now have the prompt for Python 3.3.x running, and if you exit() and simply type python, you will still have Python 2.7.3.

Wow… that was simple, and a perfect demonstration just how easy it is to work with Python. And with your new Python 3 installation, grab yourself Django 1.5 beta and get testing this release.

Django 1.5 Beta Released

November 30th, 2012 0 Comments

Django is an amazingly powerful framework for Python developers. Unfortunately it’s been trapped in the 2.7.x branch of Python for some time now, which is what Django 1.4.x runs on. But alas, there is progress being made, and milestones being reach to port to the Python 3.x branch. At this time, Python is currently progressing at 3.3.x and forward, so this move is greatly needed and Django developers are ready.

On November 27, 2012, Django 1.5 has officially reached beta 1 release status. Here’s more information:

“As part of the Django 1.5 release process, today we’ve released Django 1.5 beta 1, a preview/testing package that gives a little taste of some of the new stuff coming in Django 1.5. As with all alpha and beta packages, this is not for production use, but if you’d like to try out some of the new goodies coming in 1.5, or if you’d like to pitch in and help us fix bugs before the final 1.5 release (due in December), feel free to grab a copy and give it a spin.

You can get a copy of the 1.5 beta package from our downloads page, and we recommend you read the release notes. Also, for the security conscious, signed MD5 and SHA1 checksums of the 1.5 alpha package are available.

Also, please note that Django 1.5 now requires a minimum of Python 2.6; Python 2.5 is no longer supported. Python 3.x releases, starting with Python 3.2, are experimentally supported in this release. For more information on Python 3 support, and the testing Django 1.5 will still need, see this blog post.”

Source: https://www.djangoproject.com/weblog/2012/nov/27/15-beta-1/

Download Here and follow the installation directions:


tar xzvf Django-1.5b1.tar.gz
cd Django-1.5b1
sudo python3 setup.py install

Don’t Forget… you need Python 3.3.x installed for this, but the great thing about Python, you can have both 2.7.x and 3.3.x installed at the same time… how cool is that? This way you can continue to develop with Django 1.4, while testing out and helping the testing of 1.5. Happy coding!