setup
Module to prepare a distribution package for uploading to PyPI.
Global Attributes
| Version |
| appdataFileName |
| infoFileName |
| sourceDir |
Classes
Functions
| __pyName |
Local function to create the Python source file name for the compiled .ui file. |
| cleanupSource |
Cleanup the sources directory to get rid of leftover files and directories. |
| compileUiFiles |
Compile the .ui files to Python sources. |
| getDataFiles |
Function to return data_files in a platform dependent manner. |
| getLongDescription |
Function to get the long description via the README file. |
| getPackageData |
Function to return data files of a package with given extensions. |
| getVersion |
Function to get the version from file. |
| prepareAppdataFile |
Function to prepare a .appdata.xml file. |
| prepareInfoFile |
Function to prepare an Info.py file. |
__pyName
__pyName(py_dir, py_file)
Local function to create the Python source file name for the compiled
.ui file.
- py_dir
-
suggested name of the directory (string)
- py_file
-
suggested name for the compile source file (string)
- Returns:
-
tuple of directory name (string) and source file name (string)
cleanupSource
cleanupSource(dirName)
Cleanup the sources directory to get rid of leftover files
and directories.
- dirName
-
name of the directory to prune (string)
compileUiFiles
compileUiFiles(dirName)
Compile the .ui files to Python sources.
- dirName
-
name of the directory to compile UI files for (string)
getDataFiles
getDataFiles()
Function to return data_files in a platform dependent manner.
- Returns:
-
list containing the platform specific data files
- Return Type:
-
list of tuples of (str, list of str)
getLongDescription
getLongDescription()
Function to get the long description via the README file.
- Returns:
-
long description
- Return Type:
-
str
getPackageData
getPackageData(package, extensions)
Function to return data files of a package with given extensions.
- package (str)
-
name of the package directory
- extensions (list of str)
-
list of extensions to test for
- Returns:
-
list of package data files
- Return Type:
-
list of str
getVersion
getVersion()
Function to get the version from file.
- Returns:
-
string containing the version
- Return Type:
-
str
prepareAppdataFile
prepareAppdataFile(fileName, version)
Function to prepare a .appdata.xml file.
- fileName
-
name of the .appdata.xml file (string)
- version
-
version string for the package (string)
prepareInfoFile
prepareInfoFile(fileName, version)
Function to prepare an Info.py file.
- fileName
-
name of the Python file containing the info (string)
- version
-
version string for the package (string)