You are referring to a tutorial with roscpp, there is the same one using rospy here.
You have to modify the CmakeLists.txt in python too but not as systematically as with roscpp. In python if you want to run a simple node with no dependencies you just have to make sure to use the command chmod +x your_node.py to get an executable that rosrun can use. In cpp, whenever you create a node you have to create the executable from the CMakeLists.txt like that (taken from your tutorial) :
add_executable(talker src/talker.cpp)

But you will have to modify the CMakeList if you want to create a custom message, to use a client/server and to list all the dependencies of your package.