To install your python module you need a setup.py file inside of your project. The content of the setup.py can be something like below:
Now if you want to install it on your machine as a package just:
If you want to upload it into your python repository:
NOTE: you should be in the root of your project before running the previous command.
my_repo server should be declared inside of
If you want to install something from your repository via pip you have to provide the
NOTE: you can put inside of an ENV variable in OS to access it better and in more readable way.
#python #setuppy #setup #package #pypi #private_repo #pypirc #pip #install
setup(name=PROJECT_NAME,
version=PROJECT_VERSION,
description=PROJECT_DESCRIPTION,
long_description=PROJECT_LONG_DESCRIPTION,
author='Ali',
author_email='info@ali.com',
url='http://www.ali.com/',
license='SOMETHING',
entry_points=PROJECT_ENTRY_POINTS,
classifiers=[],
keywords='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
namespace_packages=[],
install_requires=['LIST', 'OF', 'REQUIREMENTS'],
zip_safe=False,
test_suite='nose.collector')
Now if you want to install it on your machine as a package just:
python setup.py install
If you want to upload it into your python repository:
python setup.py sdist upload -r my_repo
NOTE: you should be in the root of your project before running the previous command.
my_repo server should be declared inside of
~/.pypirc
:[distutils]
index-servers =
my_repo
[my_repo]
repository: http://pypi.repo.my_host.com:5000
username: username
password: password
If you want to install something from your repository via pip you have to provide the
extra-index-url
argument:--extra-index-url http://username:password@pypi.repo.my_host.com:5000 --trusted-host pypi.repo.my_host.com
NOTE: you can put inside of an ENV variable in OS to access it better and in more readable way.
#python #setuppy #setup #package #pypi #private_repo #pypirc #pip #install
Install
Prepare for compilation:
By default, htop will be installed under
build and install
Voila! You're done. just run it using:
#linux #centos #htop #compile #source #install
htop
on CentOS
from source:htop
is a real-time process viewer for Linux. First, install prerequisites and download the source:yum groupinstall "Development Tools"
yum install ncurses-devel
wget http://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz
tar xvfvz htop-2.0.2.tar.gz
cd htop-2.0.2/
Prepare for compilation:
./configure
By default, htop will be installed under
/usr/local/bin
. If you want to change installation location to something else (e.g., /usr/ bin`), run configure script with `--prefix
option instead. For example:./configure --prefix=/usr
build and install
htop
as follows:make
make install
Voila! You're done. just run it using:
htop
#linux #centos #htop #compile #source #install