Package: libtool
libtoollibtool is a Python library for creating a Python library,
and also manages versions and uploading to PyPi with twinelibtool runs in Python 3+ and only in Windows.InstructionsYou need to make a
use_file.ini like this(see more options below):[info]# example with if...main that uses all imports from your librarytest_file:test.py# can also be test_file=your_test_file.pyauthor:test authoremail=test.author@mail.comdescription=description of the libraryurl=http://test.author.com#dependenciesinstall_requires=mhyt,mhmovielicense:mitand your test.py (Same as test_file above) like this:frommy_test_library.file1importplusfrommy_test_library.file2importminus#if__name__=="__main__":plus(2,2)#4# ##############minus(11,1)#10To create library from ini:libtool c {your ini file}
#or
libtool create {your ini file}And the libtool creates the following files automatically:setup.py__ init __.pyLicense.txtREADME.mdand the libtool will ask you if you want to edit readme.To change version number(run version from the folder with setup.py):libtool vand the libtool ask "enter new version:".To upload (Run upload from the folder with setup.py):libtool upload
#or
libtool u
#you can add twine options e.g.
libtool u -r testpypiTwine optionshereAccess from pythonTo access the libtool from a python file:fromlibtool._cmd_argvimportcmdcmd.parse(["c","use_file.ini"])# orcmd.parse(["u","-r testpypi"])#and all commandsPrerequisiteslibtool depends on the python modules:Markdown-Editor,
requests,
setuptools,
wheel
and twineInstallingTo install with pip-
type in terminal:(sudo) pip install libtoolif this doesn't work try:pip install --upgrade setuptools wheelif there is still an error please open an issue ingithub issues.Additional optionsTo show help message:libtool ?
#or
libtool helpAdditional options for ini file (also in "info" section):#foldername with your library in it, then not all imports need#to be in filefolder=foldername#can also be folder:foldername#the version of the librarystart_version:1.0.0#cmd scripts or other files that you want in path, like in setuptools scripts.#separate scripts with commas.scripts:script1.cmd,script2.exeAdditional options for create library command:# to disable open editor to edit readme.md:
libtool c {your ini file} -e edit
# to disable create readme.md:
libtool c {your ini file} -e readme 
# to disable create setup.py:
libtool c {your ini file} -e setup
# to disable create __init__.py:
libtool c {your ini file} -e init
# to disable create licence.txt:
libtool c {your ini file} -e licence
# you can merge options
libtool c use_file.ini -e edit readme setup init licenceView exampleshereCustom optionsYou can also set custom options using Python.
To create a library:fromlibtool.libtool_classimportLibraryl=Library(test_file="test.py",email="your.email@your_mail.com",description="only for test",url="http://your.url.com",pylicense="mit",author="author",install_requires=["mhyt","mhmovie"],#and the additional options:folder="foldername",start_version="2.7.3",scripts=["script1.bat",])#to create __init__.pyl.c_init()#to create licence.txtl.c_licence()#to create setup.pyl.c_setup()#to create readme.mdl.c_md()#to edit readme.mdl.edit_md()To change version:fromlibtool.up_versionimportUpVersionUpVersion("my-sample-library")To publish to PyPi:fromlibtool.pypi.up_pypiimportupup("my-sample-library")#you can add twine options e.g.up("my-sample-library","-r testpypi")Built WithMarkdown-Editor- for editing markdown filesrequests- for HTTP request.setuptools- for setup.pywheel- build help for librarytwine- for publishing packages on PyPIAuthormatan hLicenseThis project is licensed under the MIT License.Created byThis library was created usinglibtool