Commit 29853bd5 authored by Ivan Maslov's avatar Ivan Maslov

# Add in pip and in python x32 + x64

parent d55ed342
About
------
`Naked <http://naked-py.com>`_ is a new Python command line application framework that is in development. The current release is a stable, testing release.
Updates
--------
Changes, updates, and brief tutorials are available on the `developer log <http://nakedpy.wordpress.com/>`_.
QuickStart Guide
------------------
The quickstart guide is available at `http://docs.naked-py.com/quickstart.html <http://docs.naked-py.com/quickstart.html>`_. It demonstrates how the available tools can be incorporated into your development workflow, spanning the entire period from an empty project directory to your first PyPI version release.
Documentation
--------------
Documentation is in development at `http://docs.naked-py.com/ <http://docs.naked-py.com/>`_
Issue Reporting
----------------
Issue reporting is available on the `GitHub repository <http://github.com/chrissimpkins/naked/issues>`_
Contribute
-----------
I would greatly appreciate feedback from anyone who is testing the framework. Feel free to contact me on Twitter (@csimpkins) if you have questions, comments, or problems. Please use the issue reporting link above for bug reports.
Example Application
-------------------
`Status <https://pypi.python.org/pypi/status>`_ was built from the ground up with the Naked Framework. If you'd like to check out the source, it is available on `GitHub <https://github.com/chrissimpkins/status/tree/master/lib/status>`_
Metadata-Version: 2.0
Name: Naked
Version: 0.1.31
Summary: A command line application framework
Home-page: http://naked-py.com
Author: Christopher Simpkins
Author-email: [email protected]
License: MIT
Keywords: python,command line,system,application,framework,CLI
Platform: any
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: Naked
Requires-Dist: requests
Requires-Dist: pyyaml
About
------
`Naked <http://naked-py.com>`_ is a new Python command line application framework that is in development. The current release is a stable, testing release.
Updates
--------
Changes, updates, and brief tutorials are available on the `developer log <http://nakedpy.wordpress.com/>`_.
QuickStart Guide
------------------
The quickstart guide is available at `http://docs.naked-py.com/quickstart.html <http://docs.naked-py.com/quickstart.html>`_. It demonstrates how the available tools can be incorporated into your development workflow, spanning the entire period from an empty project directory to your first PyPI version release.
Documentation
--------------
Documentation is in development at `http://docs.naked-py.com/ <http://docs.naked-py.com/>`_
Issue Reporting
----------------
Issue reporting is available on the `GitHub repository <http://github.com/chrissimpkins/naked/issues>`_
Contribute
-----------
I would greatly appreciate feedback from anyone who is testing the framework. Feel free to contact me on Twitter (@csimpkins) if you have questions, comments, or problems. Please use the issue reporting link above for bug reports.
Example Application
-------------------
`Status <https://pypi.python.org/pypi/status>`_ was built from the ground up with the Naked Framework. If you'd like to check out the source, it is available on `GitHub <https://github.com/chrissimpkins/status/tree/master/lib/status>`_
../../Scripts/naked.exe,sha256=rMRI4H8Qgi_Gxg9r50MNWd2wsP9DnbZLKLpKzLRkRD4,92999
Naked-0.1.31.data/scripts/naked,sha256=Ps1mufxMkBG7wwaJHQ_nkMwOrPP1hTZLDH7YMNO4Y2E,285
Naked-0.1.31.dist-info/DESCRIPTION.rst,sha256=26S5QwAzVdLRvvgm9ZsFe2VsF2f6xybGklQEMt0T05s,1450
Naked-0.1.31.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
Naked-0.1.31.dist-info/METADATA,sha256=z7IWAlMC3eIlNc8RlWxJ1feuDhdlQtziBOXXzcZK-c8,2341
Naked-0.1.31.dist-info/RECORD,,
Naked-0.1.31.dist-info/WHEEL,sha256=SXYYsi-y-rEGIva8sB8iKF6bAFD6YDhmqHX5hI3fc0o,110
Naked-0.1.31.dist-info/entry_points.txt,sha256=-7nL8pc5fnKhIUINYqLDa1jd3y-8jynn9u5qF9EyjqU,42
Naked-0.1.31.dist-info/pydist.json,sha256=cSetsKYPMVxYIilVGZD_wtke5QtnHkWmKGTF5uDSV10,1119
Naked-0.1.31.dist-info/top_level.txt,sha256=CG1yk0vViILO5nUzrfUqtOs-0IAsZBY1zLFGi3O-SCc,6
Naked/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Naked/__pycache__/__init__.cpython-37.pyc,,
Naked/__pycache__/app.cpython-37.pyc,,
Naked/__pycache__/commandline.cpython-37.pyc,,
Naked/__pycache__/scratchpad.cpython-37.pyc,,
Naked/__pycache__/settings.cpython-37.pyc,,
Naked/app.py,sha256=ifeYxmcVb3aolzqZNzeQGF6rnTuJatyM3swhf68G5cc,11880
Naked/commandline.py,sha256=OJ-ktVQWZeKMTbC1r446M0m1BZidwBQMA5hpXrTMK5U,18918
Naked/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Naked/commands/__pycache__/__init__.cpython-37.pyc,,
Naked/commands/__pycache__/args.cpython-37.pyc,,
Naked/commands/__pycache__/build.cpython-37.pyc,,
Naked/commands/__pycache__/classifier.cpython-37.pyc,,
Naked/commands/__pycache__/dist.cpython-37.pyc,,
Naked/commands/__pycache__/help.cpython-37.pyc,,
Naked/commands/__pycache__/locate.cpython-37.pyc,,
Naked/commands/__pycache__/make.cpython-37.pyc,,
Naked/commands/__pycache__/profile.cpython-37.pyc,,
Naked/commands/__pycache__/pyh.cpython-37.pyc,,
Naked/commands/__pycache__/test.cpython-37.pyc,,
Naked/commands/__pycache__/usage.cpython-37.pyc,,
Naked/commands/__pycache__/version.cpython-37.pyc,,
Naked/commands/args.py,sha256=DhW7JF2FNU0ns3P0RrcKM_aN8Pn51zfgLpa7edS7QoE,4681
Naked/commands/build.py,sha256=SDs5d6s4aCyT6zKWpJ4CgYnu8VKx910CKRe-E9mFhS8,1040
Naked/commands/classifier.py,sha256=NY4eOKDh3xiSJbJfvxN8D-YqjJrqc8qQ9e03vlPAf-A,1875
Naked/commands/dist.py,sha256=qGG1l9Z1T882WvRjBKIs-UQWSbN9efaZkK-qSYTTVV4,3287
Naked/commands/help.py,sha256=cQzrW2Axb4X_zR4JElmCaWUcE1xk2Sf9VpNO31FAimA,300
Naked/commands/locate.py,sha256=9wZ_RSCNju1hWGkrUGDOSlWTPg6cbA4_cKJuAKW4sxs,1449
Naked/commands/make.py,sha256=ikbMj3T24LExBaxgd465DBNNemqZb8y6RHHnKJTsQFY,18788
Naked/commands/profile.py,sha256=Rz_rWwdqXy6WrWrPaDCBrsVBwpJrwRCrsnHtqj-LmZ0,1700
Naked/commands/pyh.py,sha256=Bqfo513IKwPB0xY4YvtUSdvpSIetE9tW-gfTG2VoMqY,1071
Naked/commands/test.py,sha256=-T_cXmbS5BoL7wKuC6VxQ0W8-Q-dcRl64fVZsiEj75g,6720
Naked/commands/usage.py,sha256=ASp5GkdPHEd9Nz_rYNfjojI0KXmHMhmbs7ktte6LecY,305
Naked/commands/version.py,sha256=kSPrr4blhbTST1SNUEKnnD9UrP9UW7s9ehos-qiM5as,789
Naked/scratchpad.py,sha256=NJ6NYQrmzVHDHOEagFcACuSp0C2FiyKhHwpZbz7VkXE,743
Naked/settings.py,sha256=uXuD_QpSbaOL37N-p_4pk1Fsrb_uQpIl3wkg6uTR8Cw,2976
Naked/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Naked/templates/__pycache__/__init__.cpython-37.pyc,,
Naked/templates/__pycache__/app_file.cpython-37.pyc,,
Naked/templates/__pycache__/licenses.cpython-37.pyc,,
Naked/templates/__pycache__/manifest_in_file.cpython-37.pyc,,
Naked/templates/__pycache__/profiler_file.cpython-37.pyc,,
Naked/templates/__pycache__/pypush_file.cpython-37.pyc,,
Naked/templates/__pycache__/readme_md_file.cpython-37.pyc,,
Naked/templates/__pycache__/settings_file.cpython-37.pyc,,
Naked/templates/__pycache__/setup_cfg_file.cpython-37.pyc,,
Naked/templates/__pycache__/setup_py_file.cpython-37.pyc,,
Naked/templates/app_file.py,sha256=A874Fi7TBfX2O8uMEcYvNbpUvc15C-rrFbT9MLWOL0Q,5188
Naked/templates/licenses.py,sha256=WF2mFsv8oH_xUdEJMY17oWxmjmShOagYBQRdGReIxxE,6052
Naked/templates/manifest_in_file.py,sha256=9FkG7ZHdadisE-Uh7qdI69Hn-hfACTo7II8LG23bGBY,109
Naked/templates/profiler_file.py,sha256=XSxC4nBng26j7NmmmOXHz2wZ4702FpAGntaNeQ8WGLw,1530
Naked/templates/pypush_file.py,sha256=RUndgzH4y9LhYgka1oTvVB__yfvXdysNdK7qOzwONyE,586
Naked/templates/readme_md_file.py,sha256=njESHWuw5heC2EjRe8m7BgY1Wv2gXMUSnf0SjXLLpB4,104
Naked/templates/settings_file.py,sha256=bkCfQE_qp-tdXCwBdII_4IqaO2U5XJUyh-QvTypOW1s,1179
Naked/templates/setup_cfg_file.py,sha256=Bl-AkoQWe2Ath13L68J6pnzVPyz0FRmr7vCKIdyeAkU,107
Naked/templates/setup_py_file.py,sha256=Z2c0FpDTKnRP2txJB7fSCEkD17CnyTgIFOLCRlR_kgs,1769
Naked/toolshed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Naked/toolshed/__pycache__/__init__.cpython-37.pyc,,
Naked/toolshed/__pycache__/benchmarking.cpython-37.pyc,,
Naked/toolshed/__pycache__/casts.cpython-37.pyc,,
Naked/toolshed/__pycache__/file.cpython-37.pyc,,
Naked/toolshed/__pycache__/git.cpython-37.pyc,,
Naked/toolshed/__pycache__/ink.cpython-37.pyc,,
Naked/toolshed/__pycache__/iter.cpython-37.pyc,,
Naked/toolshed/__pycache__/network.cpython-37.pyc,,
Naked/toolshed/__pycache__/python.cpython-37.pyc,,
Naked/toolshed/__pycache__/shell.cpython-37.pyc,,
Naked/toolshed/__pycache__/state.cpython-37.pyc,,
Naked/toolshed/__pycache__/system.cpython-37.pyc,,
Naked/toolshed/__pycache__/types.cpython-37.pyc,,
Naked/toolshed/benchmarking.py,sha256=Dn5EXmR_wiAtG-mqWmBFQJ_i749_-hZ1-PxEBwSsAwQ,17235
Naked/toolshed/c/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
Naked/toolshed/c/__pycache__/__init__.cpython-37.pyc,,
Naked/toolshed/c/__pycache__/setup.cpython-37.pyc,,
Naked/toolshed/c/benchmarking.c,sha256=UDYMyo3eaMQB0cc28AfkyePULEQuvtqaFeZWK9DgzLM,880286
Naked/toolshed/c/benchmarking.pyx,sha256=Dn5EXmR_wiAtG-mqWmBFQJ_i749_-hZ1-PxEBwSsAwQ,17235
Naked/toolshed/c/build.sh,sha256=LEtZwrw9A6Tx4Z-tSf4kjSKFLTyX97xs5uoJBcitB8w,36
Naked/toolshed/c/casts.c,sha256=bgEj7BmtKcHmMd1W5qIcOC8_KH5BP66z3x_tLMF4N7I,227012
Naked/toolshed/c/casts.pyx,sha256=Jq6Wt3re7fS1-ry9uD4B38yfGi-CbwhxsLZl8HODNis,4813
Naked/toolshed/c/cstate.c,sha256=qTe_e46gCtGYUdgt--ulHl9NaE4T_K7j7D5V93AUawA,134375
Naked/toolshed/c/cstate.pyx,sha256=5EDxBjneKCRyEwQslZspCLl1A2i7dMtEIu1mfM75qpo,1089
Naked/toolshed/c/cythonize.sh,sha256=-Fy5q0oMAqOKj5aFDfRuaQUPpqGrKCSDatPdFt0d_zI,256
Naked/toolshed/c/file.c,sha256=DtLXGU5JzSJCDzC8tZxM0k_ucf3ONwepxB6Q1fipL1I,623270
Naked/toolshed/c/file.pyx,sha256=ru3r-7QVgTubZ3sbbNO_jqF0o_qfJBYzfGSXPL7X18c,19965
Naked/toolshed/c/ink.c,sha256=L0brN1oD-airTLFV378wfkLZ6r1MgAHozsl5GlaMjdo,185313
Naked/toolshed/c/ink.pyx,sha256=r73b8N46boGa7Cerw88uPGk3luNQWgoE7SS2Ru4k0ys,5460
Naked/toolshed/c/network.c,sha256=ft-bqnr3ervphD1IXiXN9krqZ6GJPmLA2OdrH9N8CaE,525661
Naked/toolshed/c/network.pyx,sha256=-NX-7RFbN2DAsOdW4mvtNYnCP1GVHx8CQubmL7wjaQg,19549
Naked/toolshed/c/python.c,sha256=E2rAQDq1pVgehMwDQenNF5ZZIBdpauHKA5TKFPWxBSk,111860
Naked/toolshed/c/python.pyx,sha256=WTST5lYVqizCtAXbHZqd5HGOO9ywCCxP8dbzLB2tbcM,2157
Naked/toolshed/c/setup.py,sha256=oOuer8J1ZqJxxWhXiYzmtPmyeaQy2FNQNp1c99AzF4U,654
Naked/toolshed/c/shell.c,sha256=1CrgdwUQsHkkzKKvVYfmZoA6OaG23xqriKiO0a_secI,376470
Naked/toolshed/c/shell.pyx,sha256=efpvnnT8cu6xXOGvhqd2MpMCiv2Z4Eau8VjRp9pAYSc,12629
Naked/toolshed/c/system.c,sha256=bSRfuYZe8C5nIk2WZrcXm5eYeJZ-3OwD5gzx2jwUPtE,620280
Naked/toolshed/c/system.pyx,sha256=bPjCcxkWLuS-X5CZgUC8Rkilc2x-S-X2e9MkvzEf-xw,24684
Naked/toolshed/c/types.c,sha256=STvR0OE_PLkGros1B0vjepCZdhClEjjaCEkqyuZNMOc,1240797
Naked/toolshed/c/types.pyx,sha256=ep0NkR_OFbmp96KaAx5mxPYYUTtc7V6L1qSkaLS_oq8,44721
Naked/toolshed/casts.py,sha256=elaNlp0hBRJ_bFPTX-4eYB90gmPrbVPz_6TY4HFrbc8,5126
Naked/toolshed/file.py,sha256=FnYhoVCgnTYU-WjedCLJFgsd9UkvbvJNt5J-ftWML3E,19941
Naked/toolshed/git.py,sha256=WAX_snuOFpVIIBPRsIZXva24wK67MEBNZE5eST4fSDg,79
Naked/toolshed/ink.py,sha256=9i_ZJpgpXtLqDs32OFGoeiNU7Ajo7xwKmI9FdCCcMt8,5436
Naked/toolshed/iter.py,sha256=yUalH_tyXYtEqsFDuy2n5ZfussXmdFunzgA4W7Ydz9M,500
Naked/toolshed/network.py,sha256=VpTSm6XQy2Pm_-atsqyt5vd9ZMnYFrJsfJhPwZ2R-js,19525
Naked/toolshed/python.py,sha256=lY-Nb8nymApIyI4pWJNHst11VA8IJygBF62ASnjg9Yk,2158
Naked/toolshed/shell.py,sha256=8hAdzS15TTzofHr2mRCLpf7ThTNiDVouQjWI18LSCNg,12605
Naked/toolshed/state.py,sha256=_PnDMY5Vws9JXN6VdoQlNWwhZ1EwoiwUDu-qjl_Nmk4,1061
Naked/toolshed/system.py,sha256=IeJhooglhxKbKiG5NYw6_ye8MeRKNSY5nOz1BZCZBNk,24660
Naked/toolshed/types.py,sha256=xd_Bu_fKu0FbULD4EvwQ_OBYWMuBVj5r4pEx4Wm7riA,44532
Wheel-Version: 1.0
Generator: bdist_wheel (0.22.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any
{"license": "MIT", "exports": {"console_scripts": {"naked": "Naked.app:main"}}, "document_names": {"description": "DESCRIPTION.rst"}, "name": "Naked", "metadata_version": "2.0", "contacts": [{"role": "author", "email": "[email protected]", "name": "Christopher Simpkins"}], "generator": "bdist_wheel (0.22.0)", "commands": {"wrap_console": {"naked": "Naked.app:main"}}, "summary": "A command line application framework", "project_urls": {"Home": "http://naked-py.com"}, "platform": "any", "run_requires": [{"requires": ["Naked", "requests", "pyyaml"]}], "version": "0.1.31", "keywords": "python,command line,system,application,framework,CLI", "classifiers": ["Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules"], "extras": []}
\ No newline at end of file
#!/usr/bin/env python
# encoding: utf-8
from Naked.commandline import Command
from Naked.toolshed.system import exit_success
import shlex
class Args:
def __init__(self, command_string):
self.com_string = command_string
def run(self):
cmd_list = shlex.split(self.com_string)
c = Command(cmd_list[0], cmd_list[1:])
print(' ')
print("•naked• Assuming that your Command object is instantiated as an instance named 'c', the command that you entered would be parsed as follows:")
print(' ')
print('Application')
print('-----------')
print('c.app = ' + c.app)
print(' ')
print('Argument List Length')
print('--------------------')
print('c.argc = ' + str(c.argc))
print(' ')
print('Argument List Items')
print('-------------------')
print('c.argobj = ' + str(c.argobj))
print(' ')
print('Arguments by Zero Indexed Start Position')
print('----------------------------------------')
print('c.arg0 = ' + c.arg0)
print('c.arg1 = ' + c.arg1)
print('c.arg2 = ' + c.arg2)
print('c.arg3 = ' + c.arg3)
print('c.arg4 = ' + c.arg4)
print(' ')
print('Arguments by Named Position')
print('---------------------------')
print('c.first = ' + c.first)
print('c.second = ' + c.second)
print('c.third = ' + c.third)
print('c.fourth = ' + c.fourth)
print('c.fifth = ' + c.fifth)
print(' ')
print('Last Positional Argument')
print('------------------------')
print('c.arglp = ' + c.arglp)
print('c.last = ' + c.last)
print(' ')
print('Primary & Secondary Commands')
print('----------------------------')
print('c.cmd = ' + c.cmd)
print('c.cmd2 = ' + c.cmd2)
print(' ')
print('Option Exists Tests')
print('------------------')
print('c.option_exists() = ' + str(c.option_exists()))
print('c.options = ' + str(c.options))
print(' ')
print('Option Argument Assignment')
print('--------------------------')
if c.option_exists(): # if there are options, iterate through and print arguments to them
non_flag_options = False
for x in range(len(c.optobj)):
if '=' in c.optobj[x]:
continue # don't print flags, they are handled below
else:
print('c.arg("' + c.optobj[x] + '") = ' + c.arg(c.optobj[x]))
non_flag_options = True
if not non_flag_options:
print("There are no short or long options in the command.")
else: # otherwise, inform user that there are no options
print("There are no short options, long options, or flags in your command.")
print(' ')
print('Flag Exists Tests')
print('----------------')
print('c.flag_exists() = ' + str(c.flag_exists()))
print('c.flags = ' + str(c.flags))
print(' ')
print('Flag Argument Assignment')
print('------------------------')
if c.flag_exists():
for y in c.optobj:
if '=' in y:
the_flag = y.split('=')[0]
print('c.flag_arg("' + the_flag + '") = ' + c.flag_arg(the_flag))
else: # provide message if there are no flags
print("There are no flag style arguments (--flag=argument) in your command.")
exit_success()
#------------------------------------------------------------------------------
# [ help function ] - help for the where command
#------------------------------------------------------------------------------
def help():
from Naked.toolshed.system import exit_success
help_string = """
Naked args Command Help
=======================
The args command displays information about the data that are parsed from a command string to Command object attributes and that are obtained from Command object methods. It is intended to help with the design of your application logic when you use the Naked command line parser.
USAGE
naked args '<command statement>'
The command statement is a mandatory argument to the command. It should include a complete command as it would be entered on the command line, including the executable. The argument should be completely enclosed within quotes.
SECONDARY COMMANDS
none
OPTIONS
none
EXAMPLE
naked args 'testapp save somestring --unicode -s --name=file.txt'"""
print(help_string)
exit_success()
if __name__ == '__main__':
pass
#!/usr/bin/env python
# encoding: utf-8
from Naked.toolshed.system import exit_success
#------------------------------------------------------------------------------
# [ compile_c_code function ] (--none--)
# compile C files in the lib/Naked/toolshed/c directory
#------------------------------------------------------------------------------
def compile_c_code(abs_dirpath):
from Naked.toolshed.shell import execute
from os import chdir
chdir(abs_dirpath)
print('•naked• Compiling the C source library files...')
success = execute("python setup.py build_ext --inplace")
if success:
print(' ')
print('•naked• C source code compile complete.')
exit_success()
def help():
help_string = """
Naked build Command Help
========================
The build command compiles the Naked C libraries. This requires an installed C compiler.
USAGE
naked build
SECONDARY COMMANDS
none
OPTIONS
none"""
print(help_string)
exit_success()
if __name__ == '__main__':
pass
#!/usr/bin/env python
# encoding: utf-8
from Naked.toolshed.system import exit_success
class Classifier:
def __init__(self, search_string):
self.needle = search_string
self.url = 'https://pypi.python.org/pypi?%3Aaction=list_classifiers'
def run(self):
from Naked.toolshed.network import HTTP
http = HTTP(self.url) # use the python.org url for the classifier list
print('•naked• Pulling the classifier list from python.org...')
res = http.get() # get the list
test_list = res.split('\n') # split on newlines
if self.needle == "": # user did not enter a search string, print the entire list
print("•naked• You did not provide a search string. Here is the entire list:")
print(' ')
for item in test_list:
print(item)
else: # user entered a search string, find it
lower_needle = self.needle.lower()
print("•naked• Performing a case insensitive search for '" + self.needle + "'")
print(' ')
filtered_list = [ x for x in test_list if lower_needle in x.lower() ] #case insensitive match for the search string
for item in filtered_list:
print(item)
exit_success() # exit with zero status code
def help():
help_string = """
Naked classify Command Help
===========================
The classify command performs a case-insensitive search of the PyPI application classifier list and displays the results.
USAGE
naked classify [search string]
The search string argument is optional. If you do not include a search string, the entire classifier list is displayed.
SECONDARY COMMANDS
none
OPTIONS
none
EXAMPLES
naked classify
naked classify Internet
"""
print(help_string)
exit_success()
if __name__ == '__main__':
pass
#!/usr/bin/env python
# encoding: utf-8
import os
from Naked.toolshed.system import file_exists, stderr, exit_success
from Naked.toolshed.shell import run as shell_run
class Dist:
def __init__(self):
self.register = "python setup.py register"
self.sdist = "python setup.py sdist upload"
self.wheel = "python setup.py bdist_wheel upload"
self.swheel = "python setup.py sdist bdist_wheel upload"
self.win = "python setup.py bdist_wininst upload"
self.all = "python setup.py sdist bdist_wheel bdist_wininst upload"
#------------------------------------------------------------------------------
# [ run method ] - iterates through up to 6 directories above current working
# directory and then runs command if setup.py found
#------------------------------------------------------------------------------
def run(self, command):
setuppy_found = False
for i in range(6): # navigate up at most 4 directory levels to search for the setup.py file
if not self._is_setup_py_at_this_level():
os.chdir(os.pardir)
else:
setuppy_found = True
self._run_dist_command(command)
break
if not setuppy_found:
stderr("Unable to locate the setup.py file for your project. Please confirm that you are in your project directory and try again.", 1)
else:
exit_success()
# search for setup.py file
def _is_setup_py_at_this_level(self):
if file_exists('setup.py'):
return True
else:
return False
# run the user requested command
def _run_dist_command(self, the_command):
if the_command in "register":
print('•naked• Running register...')
shell_run(self.register)
elif the_command in "sdist":
print('•naked• Running sdist...')
shell_run(self.sdist)
elif the_command in "wheel":
print('•naked• Running wheel...')
shell_run(self.wheel)
elif the_command in "swheel":
print('•naked• Running swheel...')
shell_run(self.swheel)
elif the_command in "win":
print('•naked• Running win...')
shell_run(self.win)
elif the_command in "all":
print('•naked• Running all...')
shell_run(self.all)
else:
stderr("Unrecognized command. Use 'naked dist help' to view the supported commands.", 1)
def help():
help_string = """
Naked dist Command Help
=======================
The dist secondary commands run the standard distutils 'python setup.py <command>' source/binary distribution commands.